@Only-api
@Post
@Get
@Delete
@Observation
Feature: Observation Diagnosis resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific Observation node. This resource is part of the Diagnosis.
File name: xad.feature
Relative path: api/xad.feature
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:16.546 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "43",
"display": "(b) Hepatic carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:17.185 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:17.185 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eH2jtODJmqewl8yw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18916/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:17.185 [print] {
"resourceType": "Observation",
"id": "18916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:20.248+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "43",
"display": "(b) Hepatic carcinomas"
}
]
}
}
> *
print COOKIES
09:58:17.185 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:17.187 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:17.187 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eH2jtODJmqewl8yw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18916/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:17.187 [print] {
"resourceType": "Observation",
"id": "18916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:20.248+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "43",
"display": "(b) Hepatic carcinomas"
}
]
}
}
> *
print COOKIES
09:58:17.187 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:18.013 [print] {
"resourceType": "Observation",
"id": "18916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:20.248+02:00",
"source": "#eH2jtODJmqewl8yw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "43",
"display": "(b) Hepatic carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:18.632 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:19.233 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:21.717+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:21.717+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:19.235 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "55",
"display": "(b.1) Fibroblastic and myofibroblastic tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:19.858 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:19.859 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rOz3QUNog03iqiLt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18917/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:19.859 [print] {
"resourceType": "Observation",
"id": "18917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:22.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "55",
"display": "(b.1) Fibroblastic and myofibroblastic tumors"
}
]
}
}
> *
print COOKIES
09:58:19.859 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:19.860 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:19.860 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rOz3QUNog03iqiLt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18917/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:19.860 [print] {
"resourceType": "Observation",
"id": "18917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:22.933+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "55",
"display": "(b.1) Fibroblastic and myofibroblastic tumors"
}
]
}
}
> *
print COOKIES
09:58:19.860 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:20.571 [print] {
"resourceType": "Observation",
"id": "18917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:22.933+02:00",
"source": "#rOz3QUNog03iqiLt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "55",
"display": "(b.1) Fibroblastic and myofibroblastic tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:21.229 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:22.096 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:24.314+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:24.314+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:22.098 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:22.808 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:22.808 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qZSN6bhILrANsPos"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18918/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:22.808 [print] {
"resourceType": "Observation",
"id": "18918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:25.831+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
> *
print COOKIES
09:58:22.808 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:22.809 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:22.809 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qZSN6bhILrANsPos"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18918/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:22.809 [print] {
"resourceType": "Observation",
"id": "18918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:25.831+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
> *
print COOKIES
09:58:22.809 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:23.427 [print] {
"resourceType": "Observation",
"id": "18918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:25.831+02:00",
"source": "#qZSN6bhILrANsPos",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:24.466 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:25.082 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:27.548+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:27.548+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:25.084 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:25.695 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:25.695 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0jRMHzaiThVBMgGo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18919/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:25.695 [print] {
"resourceType": "Observation",
"id": "18919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:28.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
> *
print COOKIES
09:58:25.695 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:25.698 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:25.698 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0jRMHzaiThVBMgGo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18919/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:25.698 [print] {
"resourceType": "Observation",
"id": "18919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:28.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
> *
print COOKIES
09:58:25.698 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:26.706 [print] {
"resourceType": "Observation",
"id": "18919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:28.777+02:00",
"source": "#0jRMHzaiThVBMgGo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:28.332 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:28.989 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:31.416+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:31.416+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:28.991 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:29.615 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:29.615 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5UzjNoHH2pNmaB7G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18920/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:29.615 [print] {
"resourceType": "Observation",
"id": "18920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:32.696+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
> *
print COOKIES
09:58:29.615 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:29.617 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:29.617 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5UzjNoHH2pNmaB7G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18920/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:29.617 [print] {
"resourceType": "Observation",
"id": "18920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:32.696+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
> *
print COOKIES
09:58:29.617 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:30.235 [print] {
"resourceType": "Observation",
"id": "18920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:32.696+02:00",
"source": "#5UzjNoHH2pNmaB7G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:30.865 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:31.467 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:33.940+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:33.940+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:31.469 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "108",
"display": "(a.1) Gastrointestinal stromal tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:32.096 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:32.096 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OqZ3UkwkLG2K5J0I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18921/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:32.097 [print] {
"resourceType": "Observation",
"id": "18921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:35.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "108",
"display": "(a.1) Gastrointestinal stromal tumor"
}
]
}
}
> *
print COOKIES
09:58:32.097 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:32.099 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:32.099 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OqZ3UkwkLG2K5J0I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18921/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:32.099 [print] {
"resourceType": "Observation",
"id": "18921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:35.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "108",
"display": "(a.1) Gastrointestinal stromal tumor"
}
]
}
}
> *
print COOKIES
09:58:32.099 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:32.723 [print] {
"resourceType": "Observation",
"id": "18921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:35.172+02:00",
"source": "#OqZ3UkwkLG2K5J0I",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "108",
"display": "(a.1) Gastrointestinal stromal tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:33.362 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:34.975 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:36.439+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:36.439+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:34.977 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:35.596 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:35.597 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qq3BoGCCHycQyyJe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18922/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:35.597 [print] {
"resourceType": "Observation",
"id": "18922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:38.672+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
> *
print COOKIES
09:58:35.597 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:35.598 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:35.598 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qq3BoGCCHycQyyJe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18922/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:35.598 [print] {
"resourceType": "Observation",
"id": "18922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:38.672+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
> *
print COOKIES
09:58:35.598 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:36.199 [print] {
"resourceType": "Observation",
"id": "18922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:38.672+02:00",
"source": "#qq3BoGCCHycQyyJe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:36.828 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:39.022 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:39.899+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:39.899+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:39.023 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:39.719 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:39.719 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"81Z6nJmdHdAS9Yji"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18923/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:39.720 [print] {
"resourceType": "Observation",
"id": "18923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:42.801+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
> *
print COOKIES
09:58:39.720 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:39.721 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:39.721 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"81Z6nJmdHdAS9Yji"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18923/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:39.721 [print] {
"resourceType": "Observation",
"id": "18923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:42.801+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
> *
print COOKIES
09:58:39.721 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:40.338 [print] {
"resourceType": "Observation",
"id": "18923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:42.801+02:00",
"source": "#81Z6nJmdHdAS9Yji",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:40.986 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:41.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:44.064+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:44.064+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:41.586 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:42.218 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:42.218 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Rmp4YIw0KMau2YJQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18924/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:42.218 [print] {
"resourceType": "Observation",
"id": "18924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:45.299+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
> *
print COOKIES
09:58:42.218 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:42.221 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:42.221 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Rmp4YIw0KMau2YJQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18924/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:42.221 [print] {
"resourceType": "Observation",
"id": "18924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:45.299+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
> *
print COOKIES
09:58:42.221 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:42.816 [print] {
"resourceType": "Observation",
"id": "18924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:45.299+02:00",
"source": "#Rmp4YIw0KMau2YJQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:43.421 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:44.023 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:46.505+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:46.505+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:44.024 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:44.619 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:44.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ukGZs6kGyiYIfGUN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18925/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:44.620 [print] {
"resourceType": "Observation",
"id": "18925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:47.705+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
> *
print COOKIES
09:58:44.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:44.621 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:44.621 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ukGZs6kGyiYIfGUN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18925/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:44.621 [print] {
"resourceType": "Observation",
"id": "18925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:47.705+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
> *
print COOKIES
09:58:44.621 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:45.249 [print] {
"resourceType": "Observation",
"id": "18925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:47.705+02:00",
"source": "#ukGZs6kGyiYIfGUN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:45.910 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:46.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:48.993+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:48.993+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:46.509 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:47.143 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:47.143 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rEnbJPuXXTUOfMzD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18926/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:47.143 [print] {
"resourceType": "Observation",
"id": "18926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:50.224+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
> *
print COOKIES
09:58:47.143 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:47.145 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:47.145 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rEnbJPuXXTUOfMzD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18926/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:47.145 [print] {
"resourceType": "Observation",
"id": "18926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:50.224+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
> *
print COOKIES
09:58:47.145 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:47.775 [print] {
"resourceType": "Observation",
"id": "18926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:50.224+02:00",
"source": "#rEnbJPuXXTUOfMzD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:48.411 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:49.033 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:51.496+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:51.496+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:49.035 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "47",
"display": "(c.1) Ewing tumor and Askin tumor of bone"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:49.652 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:49.652 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UKU6aJqZfch9sXVd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18927/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:49.652 [print] {
"resourceType": "Observation",
"id": "18927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:52.735+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "47",
"display": "(c.1) Ewing tumor and Askin tumor of bone"
}
]
}
}
> *
print COOKIES
09:58:49.652 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:49.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:49.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UKU6aJqZfch9sXVd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18927/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:49.654 [print] {
"resourceType": "Observation",
"id": "18927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:52.735+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "47",
"display": "(c.1) Ewing tumor and Askin tumor of bone"
}
]
}
}
> *
print COOKIES
09:58:49.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:50.259 [print] {
"resourceType": "Observation",
"id": "18927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:52.735+02:00",
"source": "#UKU6aJqZfch9sXVd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "47",
"display": "(c.1) Ewing tumor and Askin tumor of bone"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:50.875 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:51.518 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:53.960+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:53.960+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:51.520 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "59",
"display": "(d.1) Ewing tumor and Askin tumor of soft tissue"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:52.144 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:52.144 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d960odAjBU5g5PFN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18928/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:52.144 [print] {
"resourceType": "Observation",
"id": "18928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:55.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "59",
"display": "(d.1) Ewing tumor and Askin tumor of soft tissue"
}
]
}
}
> *
print COOKIES
09:58:52.144 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:52.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:52.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d960odAjBU5g5PFN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18928/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:52.146 [print] {
"resourceType": "Observation",
"id": "18928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:55.222+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "59",
"display": "(d.1) Ewing tumor and Askin tumor of soft tissue"
}
]
}
}
> *
print COOKIES
09:58:52.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:52.775 [print] {
"resourceType": "Observation",
"id": "18928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:55.222+02:00",
"source": "#d960odAjBU5g5PFN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "59",
"display": "(d.1) Ewing tumor and Askin tumor of soft tissue"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:53.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:54.018 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:56.488+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:56.488+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:54.019 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "91",
"display": "(e) Other and unspecified malignant gonadal tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:54.642 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"559"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:54.642 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1xidtbQ7CJ0ryzOs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18929/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:54.642 [print] {
"resourceType": "Observation",
"id": "18929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:57.723+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "91",
"display": "(e) Other and unspecified malignant gonadal tumors"
}
]
}
}
> *
print COOKIES
09:58:54.642 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:54.644 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"559"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:54.644 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1xidtbQ7CJ0ryzOs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18929/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:58:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:54.644 [print] {
"resourceType": "Observation",
"id": "18929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:57.723+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "91",
"display": "(e) Other and unspecified malignant gonadal tumors"
}
]
}
}
> *
print COOKIES
09:58:54.644 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:55.253 [print] {
"resourceType": "Observation",
"id": "18929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:58:57.723+02:00",
"source": "#1xidtbQ7CJ0ryzOs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "91",
"display": "(e) Other and unspecified malignant gonadal tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:55.898 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:56.527 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:58:58.982+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:58:58.982+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:56.528 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:57.138 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:57.138 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DLM5tVSmlqqMZhXU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18930/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:57.138 [print] {
"resourceType": "Observation",
"id": "18930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:00.220+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
> *
print COOKIES
09:58:57.138 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:57.139 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:57.139 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DLM5tVSmlqqMZhXU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18930/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:58:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:57.139 [print] {
"resourceType": "Observation",
"id": "18930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:00.220+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
> *
print COOKIES
09:58:57.139 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:58:57.773 [print] {
"resourceType": "Observation",
"id": "18930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:00.220+02:00",
"source": "#DLM5tVSmlqqMZhXU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:58:58.399 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:58:59.020 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:01.486+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:01.486+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:58:59.021 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "74",
"display": "(a.4) Intracranial and intraspinal yolk sac tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:59.655 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"558"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:59.655 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2M60SdOhvLUH8HkW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18931/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:59.655 [print] {
"resourceType": "Observation",
"id": "18931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:02.708+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "74",
"display": "(a.4) Intracranial and intraspinal yolk sac tumor"
}
]
}
}
> *
print COOKIES
09:58:59.655 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:58:59.656 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"558"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:58:59.656 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2M60SdOhvLUH8HkW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18931/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:58:59.656 [print] {
"resourceType": "Observation",
"id": "18931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:02.708+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "74",
"display": "(a.4) Intracranial and intraspinal yolk sac tumor"
}
]
}
}
> *
print COOKIES
09:58:59.656 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:00.261 [print] {
"resourceType": "Observation",
"id": "18931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:02.708+02:00",
"source": "#2M60SdOhvLUH8HkW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "74",
"display": "(a.4) Intracranial and intraspinal yolk sac tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:00.892 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:01.528 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:03.976+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:03.976+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:01.529 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:02.139 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:02.139 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oe01ptCHOT55TwH4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18932/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:02.139 [print] {
"resourceType": "Observation",
"id": "18932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:05.217+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
> *
print COOKIES
09:59:02.139 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:02.141 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:02.141 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oe01ptCHOT55TwH4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18932/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:02.141 [print] {
"resourceType": "Observation",
"id": "18932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:05.217+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
> *
print COOKIES
09:59:02.141 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:02.749 [print] {
"resourceType": "Observation",
"id": "18932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:05.217+02:00",
"source": "#oe01ptCHOT55TwH4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:03.401 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:04.004 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:06.483+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:06.483+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:04.005 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "109",
"display": "(a.2) Pancreatoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:04.650 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:04.651 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"H2ZjTP5gfaXnLABn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18933/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:04.651 [print] {
"resourceType": "Observation",
"id": "18933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:07.729+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "109",
"display": "(a.2) Pancreatoblastoma"
}
]
}
}
> *
print COOKIES
09:59:04.651 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:04.652 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:04.652 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"H2ZjTP5gfaXnLABn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18933/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:04.652 [print] {
"resourceType": "Observation",
"id": "18933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:07.729+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "109",
"display": "(a.2) Pancreatoblastoma"
}
]
}
}
> *
print COOKIES
09:59:04.652 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:05.272 [print] {
"resourceType": "Observation",
"id": "18933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:07.729+02:00",
"source": "#H2ZjTP5gfaXnLABn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "109",
"display": "(a.2) Pancreatoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:05.896 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:06.503 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:08.981+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:08.981+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:06.504 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "96",
"display": "(e) Skin carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:07.143 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:07.143 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o9LK9Hp2n7l33LII"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18934/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:07.143 [print] {
"resourceType": "Observation",
"id": "18934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:10.213+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "96",
"display": "(e) Skin carcinomas"
}
]
}
}
> *
print COOKIES
09:59:07.143 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:07.145 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:07.145 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o9LK9Hp2n7l33LII"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18934/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:07.145 [print] {
"resourceType": "Observation",
"id": "18934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:10.213+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "96",
"display": "(e) Skin carcinomas"
}
]
}
}
> *
print COOKIES
09:59:07.145 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:07.774 [print] {
"resourceType": "Observation",
"id": "18934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:10.213+02:00",
"source": "#o9LK9Hp2n7l33LII",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "96",
"display": "(e) Skin carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:08.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:09.021 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:11.500+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:11.500+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:09.022 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "77",
"display": "(b.1) Malignant germinomas of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:09.635 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:09.635 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YQPCb7H425cXESyO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18935/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:09.635 [print] {
"resourceType": "Observation",
"id": "18935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:12.712+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "77",
"display": "(b.1) Malignant germinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:59:09.635 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:09.637 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:09.637 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YQPCb7H425cXESyO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18935/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:09.637 [print] {
"resourceType": "Observation",
"id": "18935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:12.712+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "77",
"display": "(b.1) Malignant germinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:59:09.637 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:10.314 [print] {
"resourceType": "Observation",
"id": "18935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:12.712+02:00",
"source": "#YQPCb7H425cXESyO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "77",
"display": "(b.1) Malignant germinomas of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:10.965 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:11.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:14.047+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:14.047+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:11.617 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "72",
"display": "(a.2) Intracranial and intraspinal teratomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:13.227 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:13.227 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yz4gbpGvmjwDYTls"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18936/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:13.227 [print] {
"resourceType": "Observation",
"id": "18936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:16.309+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "72",
"display": "(a.2) Intracranial and intraspinal teratomas"
}
]
}
}
> *
print COOKIES
09:59:13.227 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:13.228 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:13.229 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yz4gbpGvmjwDYTls"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18936/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:13.229 [print] {
"resourceType": "Observation",
"id": "18936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:16.309+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "72",
"display": "(a.2) Intracranial and intraspinal teratomas"
}
]
}
}
> *
print COOKIES
09:59:13.229 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:13.843 [print] {
"resourceType": "Observation",
"id": "18936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:16.309+02:00",
"source": "#yz4gbpGvmjwDYTls",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "72",
"display": "(a.2) Intracranial and intraspinal teratomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:14.459 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:15.061 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:17.536+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:17.536+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:15.063 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:15.688 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:15.688 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pqY88Ao07f8AhIxv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18937/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:15.688 [print] {
"resourceType": "Observation",
"id": "18937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:18.766+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
> *
print COOKIES
09:59:15.688 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:15.689 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:15.689 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pqY88Ao07f8AhIxv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18937/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:15.689 [print] {
"resourceType": "Observation",
"id": "18937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:18.766+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
> *
print COOKIES
09:59:15.689 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:16.306 [print] {
"resourceType": "Observation",
"id": "18937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:18.766+02:00",
"source": "#pqY88Ao07f8AhIxv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "16",
"display": "(e) Unspecified lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:16.965 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:17.573 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:20.032+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:20.032+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:17.575 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:18.264 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:18.264 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qdqNNZoXO4Rs7os3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18938/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:18.264 [print] {
"resourceType": "Observation",
"id": "18938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:21.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
> *
print COOKIES
09:59:18.264 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:18.266 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:18.266 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qdqNNZoXO4Rs7os3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18938/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:18.266 [print] {
"resourceType": "Observation",
"id": "18938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:21.347+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
> *
print COOKIES
09:59:18.266 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:18.851 [print] {
"resourceType": "Observation",
"id": "18938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:21.347+02:00",
"source": "#qdqNNZoXO4Rs7os3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:19.462 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:20.101 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:22.549+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:22.549+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:20.103 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:20.716 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:20.717 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9UbgZTnLa70MyE6m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18939/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:20.717 [print] {
"resourceType": "Observation",
"id": "18939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:23.788+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
> *
print COOKIES
09:59:20.717 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:20.719 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:20.719 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9UbgZTnLa70MyE6m"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18939/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:20.719 [print] {
"resourceType": "Observation",
"id": "18939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:23.788+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
> *
print COOKIES
09:59:20.719 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:21.313 [print] {
"resourceType": "Observation",
"id": "18939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:23.788+02:00",
"source": "#9UbgZTnLa70MyE6m",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:21.950 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:22.543 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:25.030+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:25.030+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:22.544 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "100",
"display": "(f.4) Carcinomas of lung"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:23.168 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:23.168 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B5vLsyHAq7tmX7rz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18940/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:23.168 [print] {
"resourceType": "Observation",
"id": "18940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:26.251+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "100",
"display": "(f.4) Carcinomas of lung"
}
]
}
}
> *
print COOKIES
09:59:23.168 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:23.171 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:23.171 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B5vLsyHAq7tmX7rz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18940/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:23.171 [print] {
"resourceType": "Observation",
"id": "18940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:26.251+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "100",
"display": "(f.4) Carcinomas of lung"
}
]
}
}
> *
print COOKIES
09:59:23.171 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:23.783 [print] {
"resourceType": "Observation",
"id": "18940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:26.251+02:00",
"source": "#B5vLsyHAq7tmX7rz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "100",
"display": "(f.4) Carcinomas of lung"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:24.448 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:25.068 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:27.518+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:27.518+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:25.069 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:25.705 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"541"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:25.705 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"48CdUud0chioMZKa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18941/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:25.705 [print] {
"resourceType": "Observation",
"id": "18941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:28.784+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
> *
print COOKIES
09:59:25.705 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:25.707 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"541"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:25.707 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"48CdUud0chioMZKa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18941/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:25.707 [print] {
"resourceType": "Observation",
"id": "18941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:28.784+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
> *
print COOKIES
09:59:25.707 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:26.343 [print] {
"resourceType": "Observation",
"id": "18941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:28.784+02:00",
"source": "#48CdUud0chioMZKa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:26.990 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:27.611 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:30.057+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:30.057+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:27.613 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:28.220 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:28.220 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CTZIQ0MXyk8QWcH2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18942/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:28.220 [print] {
"resourceType": "Observation",
"id": "18942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:31.302+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
> *
print COOKIES
09:59:28.220 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:28.222 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:28.222 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CTZIQ0MXyk8QWcH2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18942/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:28.222 [print] {
"resourceType": "Observation",
"id": "18942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:31.302+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
> *
print COOKIES
09:59:28.222 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:28.842 [print] {
"resourceType": "Observation",
"id": "18942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:31.302+02:00",
"source": "#CTZIQ0MXyk8QWcH2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:29.455 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:30.065 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:32.528+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:32.528+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:30.067 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "86",
"display": "(c.4) Gonadal yolk sac tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:30.680 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:30.680 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LWlnUo3LXHxBMMc0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18943/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:30.680 [print] {
"resourceType": "Observation",
"id": "18943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:33.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "86",
"display": "(c.4) Gonadal yolk sac tumor"
}
]
}
}
> *
print COOKIES
09:59:30.680 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:30.681 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:30.681 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LWlnUo3LXHxBMMc0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18943/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:30.682 [print] {
"resourceType": "Observation",
"id": "18943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:33.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "86",
"display": "(c.4) Gonadal yolk sac tumor"
}
]
}
}
> *
print COOKIES
09:59:30.682 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:31.305 [print] {
"resourceType": "Observation",
"id": "18943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:33.757+02:00",
"source": "#LWlnUo3LXHxBMMc0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "86",
"display": "(c.4) Gonadal yolk sac tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:31.913 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:32.530 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:34.998+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:34.998+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:32.531 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:33.186 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:33.186 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kLFt8hVItTgtoapI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18944/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:33.186 [print] {
"resourceType": "Observation",
"id": "18944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:36.229+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
> *
print COOKIES
09:59:33.186 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:33.187 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:33.187 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kLFt8hVItTgtoapI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18944/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:33.187 [print] {
"resourceType": "Observation",
"id": "18944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:36.229+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
> *
print COOKIES
09:59:33.187 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:33.791 [print] {
"resourceType": "Observation",
"id": "18944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:36.229+02:00",
"source": "#kLFt8hVItTgtoapI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:34.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:35.014 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:37.478+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:37.478+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:35.016 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:35.636 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:35.636 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cgRyOHSBM2lJMrEM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18945/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:35.636 [print] {
"resourceType": "Observation",
"id": "18945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:38.717+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
> *
print COOKIES
09:59:35.636 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:35.638 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:35.638 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cgRyOHSBM2lJMrEM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18945/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:35.638 [print] {
"resourceType": "Observation",
"id": "18945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:38.717+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
> *
print COOKIES
09:59:35.638 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:36.855 [print] {
"resourceType": "Observation",
"id": "18945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:38.717+02:00",
"source": "#cgRyOHSBM2lJMrEM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:37.475 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:38.070 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:40.554+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:40.554+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:38.071 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "49",
"display": "(d.1) Malignant fibrous neoplasms of bone"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:38.685 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:38.685 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fSMOavkm0ULwG3w3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18946/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:38.685 [print] {
"resourceType": "Observation",
"id": "18946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:41.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "49",
"display": "(d.1) Malignant fibrous neoplasms of bone"
}
]
}
}
> *
print COOKIES
09:59:38.686 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:38.687 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:38.687 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fSMOavkm0ULwG3w3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18946/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:38.687 [print] {
"resourceType": "Observation",
"id": "18946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:41.765+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "49",
"display": "(d.1) Malignant fibrous neoplasms of bone"
}
]
}
}
> *
print COOKIES
09:59:38.687 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:39.304 [print] {
"resourceType": "Observation",
"id": "18946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:41.765+02:00",
"source": "#fSMOavkm0ULwG3w3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "49",
"display": "(d.1) Malignant fibrous neoplasms of bone"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:39.932 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:40.583 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:43.015+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:43.015+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:40.586 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:41.231 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:41.231 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PEDI49lPnFja2mID"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18947/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:41.231 [print] {
"resourceType": "Observation",
"id": "18947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:44.308+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
> *
print COOKIES
09:59:41.231 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:41.233 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:41.233 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PEDI49lPnFja2mID"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18947/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:41.233 [print] {
"resourceType": "Observation",
"id": "18947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:44.308+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
> *
print COOKIES
09:59:41.233 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:41.833 [print] {
"resourceType": "Observation",
"id": "18947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:44.308+02:00",
"source": "#PEDI49lPnFja2mID",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:42.467 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:43.068 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:45.547+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:45.547+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:43.069 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "67",
"display": "(d.9) Osseous and chondromatous neoplasms of soft tissue"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:43.711 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"565"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:43.711 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LR0xeRQTMpTDzO8p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18948/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:43.711 [print] {
"resourceType": "Observation",
"id": "18948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:46.791+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "67",
"display": "(d.9) Osseous and chondromatous neoplasms of soft tissue"
}
]
}
}
> *
print COOKIES
09:59:43.711 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:43.713 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"565"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:43.713 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LR0xeRQTMpTDzO8p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18948/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:43.713 [print] {
"resourceType": "Observation",
"id": "18948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:46.791+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "67",
"display": "(d.9) Osseous and chondromatous neoplasms of soft tissue"
}
]
}
}
> *
print COOKIES
09:59:43.713 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:44.322 [print] {
"resourceType": "Observation",
"id": "18948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:46.791+02:00",
"source": "#LR0xeRQTMpTDzO8p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "67",
"display": "(d.9) Osseous and chondromatous neoplasms of soft tissue"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:44.939 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:45.538 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:48.021+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:48.021+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:45.540 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:46.156 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:46.156 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0wq4MV5k4OCKdwId"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18949/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:46.156 [print] {
"resourceType": "Observation",
"id": "18949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:49.232+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
> *
print COOKIES
09:59:46.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:46.157 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:46.157 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0wq4MV5k4OCKdwId"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18949/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:46.157 [print] {
"resourceType": "Observation",
"id": "18949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:49.232+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
> *
print COOKIES
09:59:46.157 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:46.776 [print] {
"resourceType": "Observation",
"id": "18949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:49.232+02:00",
"source": "#0wq4MV5k4OCKdwId",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-11-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "56",
"display": "(b.2) Nerve sheath tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:47.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:48.194 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:50.480+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:50.480+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:48.196 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:48.799 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:48.800 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CQ3w10Hw8ioQzFgd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18950/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:48.800 [print] {
"resourceType": "Observation",
"id": "18950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:51.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
> *
print COOKIES
09:59:48.800 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:48.801 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:48.801 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CQ3w10Hw8ioQzFgd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18950/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:48.801 [print] {
"resourceType": "Observation",
"id": "18950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:51.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
> *
print COOKIES
09:59:48.801 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:49.420 [print] {
"resourceType": "Observation",
"id": "18950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:51.878+02:00",
"source": "#CQ3w10Hw8ioQzFgd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:50.056 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:50.681 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:53.125+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:53.125+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:50.682 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:51.288 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:51.289 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yXntu4ntGNRJtcXz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18951/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:51.289 [print] {
"resourceType": "Observation",
"id": "18951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:54.370+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
> *
print COOKIES
09:59:51.289 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:51.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:51.290 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yXntu4ntGNRJtcXz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18951/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:51.290 [print] {
"resourceType": "Observation",
"id": "18951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:54.370+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
> *
print COOKIES
09:59:51.290 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:51.917 [print] {
"resourceType": "Observation",
"id": "18951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:54.370+02:00",
"source": "#yXntu4ntGNRJtcXz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:52.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:53.207 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:55.656+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:55.656+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:53.210 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "82",
"display": "(b.6) Other and unspecified malignant mixed germ cell tumors of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:53.850 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"608"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:53.850 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NpSruZeiDJheK6sH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18952/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:53.850 [print] {
"resourceType": "Observation",
"id": "18952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:56.919+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "82",
"display": "(b.6) Other and unspecified malignant mixed germ cell tumors of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:59:53.850 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:53.852 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"608"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:53.852 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NpSruZeiDJheK6sH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18952/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:53.852 [print] {
"resourceType": "Observation",
"id": "18952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:56.919+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "82",
"display": "(b.6) Other and unspecified malignant mixed germ cell tumors of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
09:59:53.852 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:54.455 [print] {
"resourceType": "Observation",
"id": "18952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:56.919+02:00",
"source": "#NpSruZeiDJheK6sH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "82",
"display": "(b.6) Other and unspecified malignant mixed germ cell tumors of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:55.233 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:55.827 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T09:59:58.315+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T09:59:58.315+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:55.829 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "19",
"display": "(b) Astrocytomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:56.487 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"525"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:56.487 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v7w9PwBuuPEQSD3l"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18953/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:56.487 [print] {
"resourceType": "Observation",
"id": "18953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:59.556+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "19",
"display": "(b) Astrocytomas"
}
]
}
}
> *
print COOKIES
09:59:56.487 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:56.488 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"525"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:56.488 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v7w9PwBuuPEQSD3l"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18953/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 07:59:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 07:59:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:56.488 [print] {
"resourceType": "Observation",
"id": "18953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:59.556+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "19",
"display": "(b) Astrocytomas"
}
]
}
}
> *
print COOKIES
09:59:56.488 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:57.111 [print] {
"resourceType": "Observation",
"id": "18953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T09:59:59.556+02:00",
"source": "#v7w9PwBuuPEQSD3l",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "19",
"display": "(b) Astrocytomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
09:59:57.763 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
09:59:58.370 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:00.835+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:00.835+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
09:59:58.371 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:58.994 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:58.994 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JlY41rcyUu5NZ2WV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18954/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:58.994 [print] {
"resourceType": "Observation",
"id": "18954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:02.071+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
> *
print COOKIES
09:59:58.994 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
09:59:58.996 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
09:59:58.996 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JlY41rcyUu5NZ2WV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18954/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
09:59:58.996 [print] {
"resourceType": "Observation",
"id": "18954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:02.071+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
> *
print COOKIES
09:59:58.996 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
09:59:59.606 [print] {
"resourceType": "Observation",
"id": "18954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:02.071+02:00",
"source": "#JlY41rcyUu5NZ2WV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "17",
"display": "(a.1) Ependymomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:00.240 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:00.837 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:03.320+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:03.320+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:00.838 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:01.458 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:01.458 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"paJzkwtI1eDj97gG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18955/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:01.458 [print] {
"resourceType": "Observation",
"id": "18955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:04.528+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
> *
print COOKIES
10:00:01.458 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:01.460 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:01.460 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"paJzkwtI1eDj97gG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18955/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:01.460 [print] {
"resourceType": "Observation",
"id": "18955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:04.528+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
> *
print COOKIES
10:00:01.460 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:02.277 [print] {
"resourceType": "Observation",
"id": "18955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:04.528+02:00",
"source": "#paJzkwtI1eDj97gG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "36",
"display": "(a.1) Nephroblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:02.904 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:03.514 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:05.964+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:05.964+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:03.515 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:04.360 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:04.360 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AX1hBSEe1bP6BQTA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18956/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:04.360 [print] {
"resourceType": "Observation",
"id": "18956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:07.426+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
> *
print COOKIES
10:00:04.360 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:04.362 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:04.362 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AX1hBSEe1bP6BQTA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18956/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:04.362 [print] {
"resourceType": "Observation",
"id": "18956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:07.426+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
> *
print COOKIES
10:00:04.362 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:04.968 [print] {
"resourceType": "Observation",
"id": "18956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:07.426+02:00",
"source": "#AX1hBSEe1bP6BQTA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:05.581 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:06.190 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:08.659+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:08.659+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:06.192 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:06.842 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:06.842 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mz6mPOdtiqevdo3T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18957/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:06.842 [print] {
"resourceType": "Observation",
"id": "18957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:09.888+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
> *
print COOKIES
10:00:06.842 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:06.843 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:06.843 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mz6mPOdtiqevdo3T"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18957/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:06.843 [print] {
"resourceType": "Observation",
"id": "18957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:09.888+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
> *
print COOKIES
10:00:06.843 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:07.453 [print] {
"resourceType": "Observation",
"id": "18957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:09.888+02:00",
"source": "#mz6mPOdtiqevdo3T",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:09.123 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:09.717 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:12.183+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:12.183+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:09.719 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:10.339 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:10.339 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cUKhDEAWjwo6QAsM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18958/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:10.339 [print] {
"resourceType": "Observation",
"id": "18958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:13.418+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
> *
print COOKIES
10:00:10.339 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:10.341 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:10.341 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cUKhDEAWjwo6QAsM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18958/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:10.341 [print] {
"resourceType": "Observation",
"id": "18958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:13.418+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
> *
print COOKIES
10:00:10.341 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:10.946 [print] {
"resourceType": "Observation",
"id": "18958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:13.418+02:00",
"source": "#cUKhDEAWjwo6QAsM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:11.585 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:12.204 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:14.667+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:14.667+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:12.206 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-31",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:12.837 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:12.837 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"enUMTotFt4V7yGW9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18959/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:12.837 [print] {
"resourceType": "Observation",
"id": "18959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:15.903+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-31",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
> *
print COOKIES
10:00:12.837 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:12.839 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:12.839 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"enUMTotFt4V7yGW9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18959/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:12.839 [print] {
"resourceType": "Observation",
"id": "18959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:15.903+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-31",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
> *
print COOKIES
10:00:12.839 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:13.698 [print] {
"resourceType": "Observation",
"id": "18959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:15.903+02:00",
"source": "#enUMTotFt4V7yGW9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-31",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "32",
"display": "(f) Unspecified intracranial and intraspinal neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:14.320 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:14.929 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:17.401+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:17.401+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:14.930 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:15.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"541"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:15.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GmMmfPMyD8vV4GJ8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18960/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:15.549 [print] {
"resourceType": "Observation",
"id": "18960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:18.611+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
> *
print COOKIES
10:00:15.549 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:15.551 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"541"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:15.551 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GmMmfPMyD8vV4GJ8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18960/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:15.551 [print] {
"resourceType": "Observation",
"id": "18960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:18.611+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
> *
print COOKIES
10:00:15.551 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:16.189 [print] {
"resourceType": "Observation",
"id": "18960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:18.611+02:00",
"source": "#GmMmfPMyD8vV4GJ8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "13",
"display": "(b.4) Non-Hodgkin lymphomas, NOS"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:17.848 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:19.709 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:20.916+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:20.916+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:19.710 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "25",
"display": "(d.2) Mixed and unspecified gliomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:20.341 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"544"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:20.341 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"70LCUdCls6a4c8nM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18961/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:20.342 [print] {
"resourceType": "Observation",
"id": "18961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:23.416+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "25",
"display": "(d.2) Mixed and unspecified gliomas"
}
]
}
}
> *
print COOKIES
10:00:20.342 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:20.344 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"544"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:20.344 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"70LCUdCls6a4c8nM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18961/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:20.344 [print] {
"resourceType": "Observation",
"id": "18961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:23.416+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "25",
"display": "(d.2) Mixed and unspecified gliomas"
}
]
}
}
> *
print COOKIES
10:00:20.344 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:20.947 [print] {
"resourceType": "Observation",
"id": "18961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:23.416+02:00",
"source": "#70LCUdCls6a4c8nM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "25",
"display": "(d.2) Mixed and unspecified gliomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:21.594 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:22.207 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:24.670+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:24.670+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:22.208 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:22.856 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:22.856 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tU5WVkUDbf2xIlQQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18962/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:22.856 [print] {
"resourceType": "Observation",
"id": "18962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:25.932+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
> *
print COOKIES
10:00:22.856 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:22.858 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:22.858 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tU5WVkUDbf2xIlQQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18962/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:22.858 [print] {
"resourceType": "Observation",
"id": "18962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:25.932+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
> *
print COOKIES
10:00:22.858 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:23.566 [print] {
"resourceType": "Observation",
"id": "18962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:25.932+02:00",
"source": "#tU5WVkUDbf2xIlQQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:24.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:24.793 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:27.247+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:27.247+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:24.794 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:25.430 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:25.430 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ndqZhFcPO8GVYVZ4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18963/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:25.430 [print] {
"resourceType": "Observation",
"id": "18963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:28.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
> *
print COOKIES
10:00:25.430 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:25.432 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:25.432 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ndqZhFcPO8GVYVZ4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18963/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:25.432 [print] {
"resourceType": "Observation",
"id": "18963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:28.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
> *
print COOKIES
10:00:25.432 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:26.046 [print] {
"resourceType": "Observation",
"id": "18963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:28.501+02:00",
"source": "#ndqZhFcPO8GVYVZ4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:26.667 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:27.302 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:29.745+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:29.745+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:27.303 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-01-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:27.974 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:27.974 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qpMHpFs3B3Lyl75S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18964/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:27.974 [print] {
"resourceType": "Observation",
"id": "18964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:31.053+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-01-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
> *
print COOKIES
10:00:27.975 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:27.977 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:27.977 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qpMHpFs3B3Lyl75S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18964/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:27.977 [print] {
"resourceType": "Observation",
"id": "18964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:31.053+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-01-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
> *
print COOKIES
10:00:27.978 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:28.569 [print] {
"resourceType": "Observation",
"id": "18964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:31.053+02:00",
"source": "#qpMHpFs3B3Lyl75S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-01-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "3",
"display": "(a.3) Mature T-cell and NK cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:29.203 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:29.802 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:32.285+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:32.285+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:29.804 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:30.426 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:30.426 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"b9gH1moL6NwHkofc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18965/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:30.426 [print] {
"resourceType": "Observation",
"id": "18965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:33.506+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
> *
print COOKIES
10:00:30.426 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:30.428 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:30.428 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"b9gH1moL6NwHkofc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18965/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:30.428 [print] {
"resourceType": "Observation",
"id": "18965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:33.506+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
> *
print COOKIES
10:00:30.428 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:31.350 [print] {
"resourceType": "Observation",
"id": "18965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:33.506+02:00",
"source": "#b9gH1moL6NwHkofc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:31.966 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:32.590 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:35.049+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:35.049+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:32.591 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:33.230 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:33.230 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vrhzqTvEwFPPsHBF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18966/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:33.230 [print] {
"resourceType": "Observation",
"id": "18966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:36.311+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
> *
print COOKIES
10:00:33.230 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:33.232 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:33.232 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vrhzqTvEwFPPsHBF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18966/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:33.232 [print] {
"resourceType": "Observation",
"id": "18966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:36.311+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
> *
print COOKIES
10:00:33.232 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:34.051 [print] {
"resourceType": "Observation",
"id": "18966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:36.311+02:00",
"source": "#vrhzqTvEwFPPsHBF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "45",
"display": "(a) Osteosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:34.675 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:35.286 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:37.755+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:37.755+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:35.287 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "34",
"display": "(b) Other peripheral nervous cell tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:35.895 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:35.895 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CePLcYeYoT89fl7t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18967/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:35.895 [print] {
"resourceType": "Observation",
"id": "18967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:38.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "34",
"display": "(b) Other peripheral nervous cell tumors"
}
]
}
}
> *
print COOKIES
10:00:35.895 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:35.897 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:35.897 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CePLcYeYoT89fl7t"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18967/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:35.897 [print] {
"resourceType": "Observation",
"id": "18967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:38.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "34",
"display": "(b) Other peripheral nervous cell tumors"
}
]
}
}
> *
print COOKIES
10:00:35.897 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:36.507 [print] {
"resourceType": "Observation",
"id": "18967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:38.970+02:00",
"source": "#CePLcYeYoT89fl7t",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "34",
"display": "(b) Other peripheral nervous cell tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:37.149 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:37.790 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:40.227+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:40.227+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:37.791 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "106",
"display": "(f.10) Carcinomas of other specified sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:38.424 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:38.424 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DWx9ffURhM0nO3Iu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18968/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:38.424 [print] {
"resourceType": "Observation",
"id": "18968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:41.499+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "106",
"display": "(f.10) Carcinomas of other specified sites"
}
]
}
}
> *
print COOKIES
10:00:38.424 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:38.426 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:38.426 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DWx9ffURhM0nO3Iu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18968/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:38.426 [print] {
"resourceType": "Observation",
"id": "18968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:41.499+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "106",
"display": "(f.10) Carcinomas of other specified sites"
}
]
}
}
> *
print COOKIES
10:00:38.426 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:39.031 [print] {
"resourceType": "Observation",
"id": "18968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:41.499+02:00",
"source": "#DWx9ffURhM0nO3Iu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "106",
"display": "(f.10) Carcinomas of other specified sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:40.072 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:40.703 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:43.147+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:43.147+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:40.704 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "68",
"display": "(d.10) Alveolar soft parts sarcoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:41.317 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:41.317 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qHYG0ce1cSRbhe2A"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18969/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:41.317 [print] {
"resourceType": "Observation",
"id": "18969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:44.398+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "68",
"display": "(d.10) Alveolar soft parts sarcoma"
}
]
}
}
> *
print COOKIES
10:00:41.317 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:41.319 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:41.319 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qHYG0ce1cSRbhe2A"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18969/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:41.319 [print] {
"resourceType": "Observation",
"id": "18969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:44.398+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "68",
"display": "(d.10) Alveolar soft parts sarcoma"
}
]
}
}
> *
print COOKIES
10:00:41.319 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:42.148 [print] {
"resourceType": "Observation",
"id": "18969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:44.398+02:00",
"source": "#qHYG0ce1cSRbhe2A",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "68",
"display": "(d.10) Alveolar soft parts sarcoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:43.058 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:43.951 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:46.139+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:46.139+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:43.952 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:45.104 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:45.104 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IpffLnhmcALSOf13"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18970/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:45.104 [print] {
"resourceType": "Observation",
"id": "18970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:47.963+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
> *
print COOKIES
10:00:45.104 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:45.106 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:45.106 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IpffLnhmcALSOf13"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18970/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:45.106 [print] {
"resourceType": "Observation",
"id": "18970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:47.963+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
> *
print COOKIES
10:00:45.106 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:46.717 [print] {
"resourceType": "Observation",
"id": "18970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:47.963+02:00",
"source": "#IpffLnhmcALSOf13",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:47.355 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:47.983 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:50.432+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:50.432+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:47.986 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:48.616 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:48.616 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Gqjih7u5kCV8YBgB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18971/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:48.616 [print] {
"resourceType": "Observation",
"id": "18971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:51.694+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
> *
print COOKIES
10:00:48.616 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:48.618 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:48.618 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Gqjih7u5kCV8YBgB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18971/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:48.618 [print] {
"resourceType": "Observation",
"id": "18971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:51.694+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
> *
print COOKIES
10:00:48.618 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:49.218 [print] {
"resourceType": "Observation",
"id": "18971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:51.694+02:00",
"source": "#Gqjih7u5kCV8YBgB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-09-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:49.859 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:50.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:52.928+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:52.928+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:50.469 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:51.087 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:51.087 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VuORJk4nTyAwjnvW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18972/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:51.087 [print] {
"resourceType": "Observation",
"id": "18972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:54.163+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
> *
print COOKIES
10:00:51.087 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:51.089 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:51.089 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VuORJk4nTyAwjnvW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18972/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:51.089 [print] {
"resourceType": "Observation",
"id": "18972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:54.163+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
> *
print COOKIES
10:00:51.089 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:51.711 [print] {
"resourceType": "Observation",
"id": "18972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:54.163+02:00",
"source": "#VuORJk4nTyAwjnvW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:52.344 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:53.182 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:55.412+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:55.412+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:53.183 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:54.071 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:54.071 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aTWMzjhbYJZNc4gh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18973/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:54.071 [print] {
"resourceType": "Observation",
"id": "18973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:57.148+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
> *
print COOKIES
10:00:54.071 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:54.073 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"553"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:54.073 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aTWMzjhbYJZNc4gh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18973/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:00:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:00:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:54.073 [print] {
"resourceType": "Observation",
"id": "18973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:57.148+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
> *
print COOKIES
10:00:54.073 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:54.726 [print] {
"resourceType": "Observation",
"id": "18973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:00:57.148+02:00",
"source": "#aTWMzjhbYJZNc4gh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "8",
"display": "(e) Unspecified and other specified leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:55.363 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:55.990 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:00:58.443+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:00:58.443+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:55.991 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:57.612 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:57.612 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"48OfSSgTKVaHPLn9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18974/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:57.612 [print] {
"resourceType": "Observation",
"id": "18974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:00.691+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
> *
print COOKIES
10:00:57.612 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:00:57.614 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:00:57.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"48OfSSgTKVaHPLn9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18974/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:00:57.614 [print] {
"resourceType": "Observation",
"id": "18974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:00.691+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
> *
print COOKIES
10:00:57.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:00:58.214 [print] {
"resourceType": "Observation",
"id": "18974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:00.691+02:00",
"source": "#48OfSSgTKVaHPLn9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "62",
"display": "(d.4) Liposarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:00:59.080 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:00:59.684 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:02.161+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:02.161+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:00:59.686 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:00.321 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:00.321 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lq7WQd1GUMK5SbSJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18975/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:00.321 [print] {
"resourceType": "Observation",
"id": "18975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:03.402+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
> *
print COOKIES
10:01:00.321 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:00.323 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:00.323 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lq7WQd1GUMK5SbSJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18975/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:00.323 [print] {
"resourceType": "Observation",
"id": "18975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:03.402+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
> *
print COOKIES
10:01:00.323 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:00.945 [print] {
"resourceType": "Observation",
"id": "18975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:03.402+02:00",
"source": "#lq7WQd1GUMK5SbSJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:01.590 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:02.721 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:04.665+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:04.665+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:02.722 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:03.355 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"519"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:03.355 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WQx8Ir0ih9GKOBIS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18976/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:03.355 [print] {
"resourceType": "Observation",
"id": "18976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:06.433+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
> *
print COOKIES
10:01:03.355 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:03.357 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"519"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:03.357 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WQx8Ir0ih9GKOBIS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18976/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:03.357 [print] {
"resourceType": "Observation",
"id": "18976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:06.433+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
> *
print COOKIES
10:01:03.357 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:03.969 [print] {
"resourceType": "Observation",
"id": "18976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:06.433+02:00",
"source": "#WQx8Ir0ih9GKOBIS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:04.620 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:05.225 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:07.696+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:07.696+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:05.226 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:05.848 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:05.848 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qFQR2PEJN8h4mXUb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18977/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:05.848 [print] {
"resourceType": "Observation",
"id": "18977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:08.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
> *
print COOKIES
10:01:05.848 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:05.850 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:05.850 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qFQR2PEJN8h4mXUb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18977/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:05.850 [print] {
"resourceType": "Observation",
"id": "18977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:08.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
> *
print COOKIES
10:01:05.850 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:06.472 [print] {
"resourceType": "Observation",
"id": "18977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:08.930+02:00",
"source": "#qFQR2PEJN8h4mXUb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:07.507 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:09.162 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:10.574+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:10.574+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:09.164 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "78",
"display": "(b.2) Malignant teratomas of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:09.791 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"573"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:09.791 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jKk17cOsfFXY5Eo7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18978/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:09.791 [print] {
"resourceType": "Observation",
"id": "18978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:12.866+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "78",
"display": "(b.2) Malignant teratomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
10:01:09.792 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:09.793 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"573"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:09.793 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jKk17cOsfFXY5Eo7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18978/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:09.793 [print] {
"resourceType": "Observation",
"id": "18978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:12.866+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "78",
"display": "(b.2) Malignant teratomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
10:01:09.793 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:10.440 [print] {
"resourceType": "Observation",
"id": "18978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:12.866+02:00",
"source": "#jKk17cOsfFXY5Eo7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "78",
"display": "(b.2) Malignant teratomas of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:11.066 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:11.682 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:14.145+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:14.145+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:11.683 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:12.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:12.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BK4PVUqW6tDJblqq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18979/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:12.307 [print] {
"resourceType": "Observation",
"id": "18979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:15.383+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
10:01:12.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:12.308 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:12.308 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BK4PVUqW6tDJblqq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18979/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:12.308 [print] {
"resourceType": "Observation",
"id": "18979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:15.383+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
10:01:12.309 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:12.921 [print] {
"resourceType": "Observation",
"id": "18979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:15.383+02:00",
"source": "#BK4PVUqW6tDJblqq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-02-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:13.540 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:14.135 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:16.618+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:16.618+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:14.136 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "63",
"display": "(d.5) Fibrohistiocytic tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:15.108 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:15.108 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"efo3VbiGCdKxpzcX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18980/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:15.108 [print] {
"resourceType": "Observation",
"id": "18980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:18.188+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "63",
"display": "(d.5) Fibrohistiocytic tumors"
}
]
}
}
> *
print COOKIES
10:01:15.108 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:15.110 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:15.110 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"efo3VbiGCdKxpzcX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18980/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:15.110 [print] {
"resourceType": "Observation",
"id": "18980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:18.188+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "63",
"display": "(d.5) Fibrohistiocytic tumors"
}
]
}
}
> *
print COOKIES
10:01:15.110 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:15.731 [print] {
"resourceType": "Observation",
"id": "18980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:18.188+02:00",
"source": "#efo3VbiGCdKxpzcX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "63",
"display": "(d.5) Fibrohistiocytic tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:16.394 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:17.033 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:19.472+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:19.472+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:17.034 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "92",
"display": "(a) Adrenocortical carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:17.669 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:17.669 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Mbt97d0KEcQZSWNo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18981/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:17.669 [print] {
"resourceType": "Observation",
"id": "18981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:20.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "92",
"display": "(a) Adrenocortical carcinomas"
}
]
}
}
> *
print COOKIES
10:01:17.669 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:17.670 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:17.670 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Mbt97d0KEcQZSWNo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18981/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:17.670 [print] {
"resourceType": "Observation",
"id": "18981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:20.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "92",
"display": "(a) Adrenocortical carcinomas"
}
]
}
}
> *
print COOKIES
10:01:17.670 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:18.279 [print] {
"resourceType": "Observation",
"id": "18981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:20.731+02:00",
"source": "#Mbt97d0KEcQZSWNo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "92",
"display": "(a) Adrenocortical carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:18.893 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:19.503 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:21.979+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:21.979+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:19.505 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:20.124 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"551"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:20.124 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jP5vHdch7byEv4RH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18982/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:20.124 [print] {
"resourceType": "Observation",
"id": "18982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:23.206+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
> *
print COOKIES
10:01:20.124 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:20.126 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"551"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:20.126 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jP5vHdch7byEv4RH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18982/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:20.126 [print] {
"resourceType": "Observation",
"id": "18982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:23.206+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
> *
print COOKIES
10:01:20.126 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:20.759 [print] {
"resourceType": "Observation",
"id": "18982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:23.206+02:00",
"source": "#jP5vHdch7byEv4RH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:21.381 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:22.015 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:24.465+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:24.465+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:22.017 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:22.655 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:22.655 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oFUEwTKJHUxwgbmX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18983/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:22.656 [print] {
"resourceType": "Observation",
"id": "18983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:25.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
> *
print COOKIES
10:01:22.656 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:22.657 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:22.657 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oFUEwTKJHUxwgbmX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18983/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:22.657 [print] {
"resourceType": "Observation",
"id": "18983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:25.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
> *
print COOKIES
10:01:22.657 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:23.302 [print] {
"resourceType": "Observation",
"id": "18983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:25.722+02:00",
"source": "#oFUEwTKJHUxwgbmX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:23.959 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 20ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 20ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:24.650 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:27.028+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:27.028+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:24.652 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:25.295 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"539"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:25.295 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xC6Yepr47QPl9xl7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18984/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:25.295 [print] {
"resourceType": "Observation",
"id": "18984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:28.368+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
> *
print COOKIES
10:01:25.295 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:25.297 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"539"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:25.297 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xC6Yepr47QPl9xl7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18984/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:25.297 [print] {
"resourceType": "Observation",
"id": "18984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:28.368+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
> *
print COOKIES
10:01:25.297 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:25.917 [print] {
"resourceType": "Observation",
"id": "18984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:28.368+02:00",
"source": "#xC6Yepr47QPl9xl7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:26.587 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:27.227 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:29.653+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:29.653+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:27.228 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "103",
"display": "(f.7) Carcinomas of cervix uteri"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:27.887 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:27.887 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NddAl9s9DIdTSbbr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18985/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:27.887 [print] {
"resourceType": "Observation",
"id": "18985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:30.942+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "103",
"display": "(f.7) Carcinomas of cervix uteri"
}
]
}
}
> *
print COOKIES
10:01:27.887 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:27.889 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:27.889 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NddAl9s9DIdTSbbr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18985/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:27.889 [print] {
"resourceType": "Observation",
"id": "18985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:30.942+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "103",
"display": "(f.7) Carcinomas of cervix uteri"
}
]
}
}
> *
print COOKIES
10:01:27.889 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:28.569 [print] {
"resourceType": "Observation",
"id": "18985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:30.942+02:00",
"source": "#NddAl9s9DIdTSbbr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "103",
"display": "(f.7) Carcinomas of cervix uteri"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:29.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:30.099 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:32.473+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:32.473+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:30.100 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:30.742 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:30.742 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yMczFjN9mvhUx6Yt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18986/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:30.742 [print] {
"resourceType": "Observation",
"id": "18986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:33.810+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
> *
print COOKIES
10:01:30.742 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:30.744 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:30.744 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yMczFjN9mvhUx6Yt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18986/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:30.744 [print] {
"resourceType": "Observation",
"id": "18986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:33.810+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
> *
print COOKIES
10:01:30.744 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:31.761 [print] {
"resourceType": "Observation",
"id": "18986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:33.810+02:00",
"source": "#yMczFjN9mvhUx6Yt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:32.414 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:33.048 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:35.486+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:35.486+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:33.050 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:33.679 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:33.679 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WXvksBoMkdarWGOw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18987/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:33.679 [print] {
"resourceType": "Observation",
"id": "18987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:36.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
> *
print COOKIES
10:01:33.679 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:33.681 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:33.681 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WXvksBoMkdarWGOw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18987/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:33.681 [print] {
"resourceType": "Observation",
"id": "18987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:36.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
> *
print COOKIES
10:01:33.681 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:34.289 [print] {
"resourceType": "Observation",
"id": "18987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:36.731+02:00",
"source": "#WXvksBoMkdarWGOw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:34.916 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:35.544 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:37.995+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:37.995+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:35.545 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:36.155 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:36.155 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sjCRSUETBYhkvjzP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18988/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:36.155 [print] {
"resourceType": "Observation",
"id": "18988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:39.234+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
> *
print COOKIES
10:01:36.155 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:36.157 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:36.157 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sjCRSUETBYhkvjzP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18988/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:36.157 [print] {
"resourceType": "Observation",
"id": "18988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:39.234+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
> *
print COOKIES
10:01:36.157 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:36.763 [print] {
"resourceType": "Observation",
"id": "18988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:39.234+02:00",
"source": "#sjCRSUETBYhkvjzP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:37.389 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:37.985 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:40.462+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:40.462+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:37.987 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:38.599 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:38.599 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wvwcUfiFGqAQDyJm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18989/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:38.599 [print] {
"resourceType": "Observation",
"id": "18989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:41.681+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
> *
print COOKIES
10:01:38.599 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:38.601 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:38.601 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wvwcUfiFGqAQDyJm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18989/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:38.601 [print] {
"resourceType": "Observation",
"id": "18989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:41.681+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
> *
print COOKIES
10:01:38.601 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:39.215 [print] {
"resourceType": "Observation",
"id": "18989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:41.681+02:00",
"source": "#wvwcUfiFGqAQDyJm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:40.233 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:40.870 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:43.303+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:43.303+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:40.871 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:41.525 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:41.525 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dCxPjjITWb3iVWUn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18990/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:41.525 [print] {
"resourceType": "Observation",
"id": "18990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:44.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
> *
print COOKIES
10:01:41.525 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:41.526 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:41.526 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dCxPjjITWb3iVWUn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18990/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:41.526 [print] {
"resourceType": "Observation",
"id": "18990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:44.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
> *
print COOKIES
10:01:41.526 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:42.174 [print] {
"resourceType": "Observation",
"id": "18990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:44.565+02:00",
"source": "#dCxPjjITWb3iVWUn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "12",
"display": "(b.3) Mature T-cell and NK-cell lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:42.822 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:43.430 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:45.900+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:45.900+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:43.431 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:44.276 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:44.276 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QkZL7XXZsKZH49bh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18991/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:44.276 [print] {
"resourceType": "Observation",
"id": "18991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:47.150+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
> *
print COOKIES
10:01:44.277 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:44.278 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:44.278 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QkZL7XXZsKZH49bh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18991/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:44.278 [print] {
"resourceType": "Observation",
"id": "18991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:47.150+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
> *
print COOKIES
10:01:44.278 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:44.894 [print] {
"resourceType": "Observation",
"id": "18991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:47.150+02:00",
"source": "#QkZL7XXZsKZH49bh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:45.563 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:46.183 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:48.630+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:48.630+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:46.185 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-09-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:46.805 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:46.805 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JDS0v1AfIarkwzCB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18992/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:46.805 [print] {
"resourceType": "Observation",
"id": "18992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:49.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-09-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
> *
print COOKIES
10:01:46.805 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:46.807 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:46.807 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JDS0v1AfIarkwzCB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18992/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:46.807 [print] {
"resourceType": "Observation",
"id": "18992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:49.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-09-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
> *
print COOKIES
10:01:46.807 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:47.449 [print] {
"resourceType": "Observation",
"id": "18992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:49.878+02:00",
"source": "#JDS0v1AfIarkwzCB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-09-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:48.106 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:48.761 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:51.179+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:51.179+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:48.763 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:49.405 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:49.405 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sbI6wIL7gasWGpVC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18993/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:49.405 [print] {
"resourceType": "Observation",
"id": "18993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:52.474+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
> *
print COOKIES
10:01:49.405 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:49.407 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:49.407 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sbI6wIL7gasWGpVC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18993/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:49.407 [print] {
"resourceType": "Observation",
"id": "18993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:52.474+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
> *
print COOKIES
10:01:49.407 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:50.203 [print] {
"resourceType": "Observation",
"id": "18993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:52.474+02:00",
"source": "#sbI6wIL7gasWGpVC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "42",
"display": "(a) Hepatoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:51.080 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:51.727 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:54.140+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:54.140+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:51.729 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:52.341 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:52.341 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6A1VUEqFwHL3aqrK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18994/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:52.341 [print] {
"resourceType": "Observation",
"id": "18994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:55.423+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
> *
print COOKIES
10:01:52.341 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:52.343 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:52.343 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6A1VUEqFwHL3aqrK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18994/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:52.343 [print] {
"resourceType": "Observation",
"id": "18994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:55.423+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
> *
print COOKIES
10:01:52.343 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:52.987 [print] {
"resourceType": "Observation",
"id": "18994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:55.423+02:00",
"source": "#6A1VUEqFwHL3aqrK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-12-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:53.651 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:54.302 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:56.727+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:56.727+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:54.303 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:54.926 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:54.926 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gC27TkiBtzUYrHeY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18995/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:54.926 [print] {
"resourceType": "Observation",
"id": "18995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:58.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
> *
print COOKIES
10:01:54.926 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:54.927 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:54.927 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gC27TkiBtzUYrHeY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18995/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:01:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:01:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:54.927 [print] {
"resourceType": "Observation",
"id": "18995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:58.006+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
> *
print COOKIES
10:01:54.927 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:55.538 [print] {
"resourceType": "Observation",
"id": "18995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:01:58.006+02:00",
"source": "#gC27TkiBtzUYrHeY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "64",
"display": "(d.6) Leiomyosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:56.158 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:56.883 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:01:59.241+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:01:59.241+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:56.885 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:57.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:57.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NQVCiQGQb1UoVDjx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18996/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:57.554 [print] {
"resourceType": "Observation",
"id": "18996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:00.622+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
> *
print COOKIES
10:01:57.554 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:01:57.556 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:01:57.556 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NQVCiQGQb1UoVDjx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18996/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:01:57.556 [print] {
"resourceType": "Observation",
"id": "18996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:00.622+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
> *
print COOKIES
10:01:57.556 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:01:58.443 [print] {
"resourceType": "Observation",
"id": "18996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:00.622+02:00",
"source": "#NQVCiQGQb1UoVDjx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:01:59.085 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:01:59.688 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:02.164+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:02.164+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:01:59.689 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:00.318 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:00.318 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eCGBBG6mYW91uwcI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18997/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:00.319 [print] {
"resourceType": "Observation",
"id": "18997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:03.392+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
> *
print COOKIES
10:02:00.319 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:00.320 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:00.320 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eCGBBG6mYW91uwcI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18997/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:00.320 [print] {
"resourceType": "Observation",
"id": "18997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:03.392+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
> *
print COOKIES
10:02:00.320 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:01.150 [print] {
"resourceType": "Observation",
"id": "18997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:03.392+02:00",
"source": "#eCGBBG6mYW91uwcI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "41",
"display": "(c) Unspecified malignant renal tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:01.796 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:02.436 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:04.867+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:04.867+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:02.437 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "88",
"display": "(c.6) Malignant gonadal tumors of mixed forms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:03.081 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:03.081 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m894FkWqc2wgKjFe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18998/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:03.081 [print] {
"resourceType": "Observation",
"id": "18998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:06.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "88",
"display": "(c.6) Malignant gonadal tumors of mixed forms"
}
]
}
}
> *
print COOKIES
10:02:03.081 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:03.083 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:03.083 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m894FkWqc2wgKjFe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18998/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:03.083 [print] {
"resourceType": "Observation",
"id": "18998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:06.140+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "88",
"display": "(c.6) Malignant gonadal tumors of mixed forms"
}
]
}
}
> *
print COOKIES
10:02:03.083 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:03.727 [print] {
"resourceType": "Observation",
"id": "18998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:06.140+02:00",
"source": "#m894FkWqc2wgKjFe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "88",
"display": "(c.6) Malignant gonadal tumors of mixed forms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:04.617 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:05.233 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:07.688+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:07.688+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:05.236 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-04-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "80",
"display": "(b.4) Yolk sac tumor of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:05.861 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"568"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:05.861 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zu0usaXn4XGCph0S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18999/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:05.861 [print] {
"resourceType": "Observation",
"id": "18999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:08.938+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-04-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "80",
"display": "(b.4) Yolk sac tumor of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
10:02:05.861 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:05.863 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"568"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:05.863 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zu0usaXn4XGCph0S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18999/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/18999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:05.863 [print] {
"resourceType": "Observation",
"id": "18999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:08.938+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-04-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "80",
"display": "(b.4) Yolk sac tumor of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
10:02:05.863 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:06.484 [print] {
"resourceType": "Observation",
"id": "18999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:08.938+02:00",
"source": "#zu0usaXn4XGCph0S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-04-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "80",
"display": "(b.4) Yolk sac tumor of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:07.127 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:07.734 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:10.205+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:10.205+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:07.735 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "69",
"display": "(d.11) Miscellaneous soft tissue sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:08.348 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:08.348 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0vZVFT9mXsq70Bks"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19000/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:08.348 [print] {
"resourceType": "Observation",
"id": "19000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:11.429+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "69",
"display": "(d.11) Miscellaneous soft tissue sarcomas"
}
]
}
}
> *
print COOKIES
10:02:08.348 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:08.350 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:08.350 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0vZVFT9mXsq70Bks"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19000/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:08.350 [print] {
"resourceType": "Observation",
"id": "19000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:11.429+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "69",
"display": "(d.11) Miscellaneous soft tissue sarcomas"
}
]
}
}
> *
print COOKIES
10:02:08.350 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:08.969 [print] {
"resourceType": "Observation",
"id": "19000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:11.429+02:00",
"source": "#0vZVFT9mXsq70Bks",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-02-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "69",
"display": "(d.11) Miscellaneous soft tissue sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:09.578 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:10.252 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:12.661+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:12.661+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:10.253 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:11.872 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:11.872 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mrvduIoKRnd4QlSD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19001/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:11.872 [print] {
"resourceType": "Observation",
"id": "19001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:14.947+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
> *
print COOKIES
10:02:11.872 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:11.874 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:11.874 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mrvduIoKRnd4QlSD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19001/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:11.874 [print] {
"resourceType": "Observation",
"id": "19001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:14.947+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
> *
print COOKIES
10:02:11.874 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:12.512 [print] {
"resourceType": "Observation",
"id": "19001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:14.947+02:00",
"source": "#mrvduIoKRnd4QlSD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:13.122 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:13.725 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:16.202+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:16.202+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:13.726 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "111",
"display": "(a.4) Other complex mixed and stromal neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:14.356 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:14.356 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8zFIumbTSgINHfTJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19002/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:14.356 [print] {
"resourceType": "Observation",
"id": "19002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:17.422+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "111",
"display": "(a.4) Other complex mixed and stromal neoplasms"
}
]
}
}
> *
print COOKIES
10:02:14.356 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:14.358 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"557"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:14.358 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8zFIumbTSgINHfTJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19002/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:14.358 [print] {
"resourceType": "Observation",
"id": "19002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:17.422+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "111",
"display": "(a.4) Other complex mixed and stromal neoplasms"
}
]
}
}
> *
print COOKIES
10:02:14.359 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:14.986 [print] {
"resourceType": "Observation",
"id": "19002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:17.422+02:00",
"source": "#8zFIumbTSgINHfTJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "111",
"display": "(a.4) Other complex mixed and stromal neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:15.996 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:16.632 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:19.075+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:19.075+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:16.635 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:17.270 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:17.270 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kerPT5RHGErc94aR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19003/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:17.270 [print] {
"resourceType": "Observation",
"id": "19003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:20.349+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
> *
print COOKIES
10:02:17.270 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:17.273 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:17.273 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kerPT5RHGErc94aR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19003/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:17.273 [print] {
"resourceType": "Observation",
"id": "19003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:20.349+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
> *
print COOKIES
10:02:17.273 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:17.917 [print] {
"resourceType": "Observation",
"id": "19003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:20.349+02:00",
"source": "#kerPT5RHGErc94aR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:18.561 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:19.212 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:21.645+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:21.645+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:19.213 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:19.818 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:19.818 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Br5A6i5JoI5hSi8H"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19004/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:19.818 [print] {
"resourceType": "Observation",
"id": "19004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:22.897+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
10:02:19.818 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:19.820 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:19.820 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Br5A6i5JoI5hSi8H"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19004/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:19.820 [print] {
"resourceType": "Observation",
"id": "19004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:22.897+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
10:02:19.820 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:20.434 [print] {
"resourceType": "Observation",
"id": "19004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:22.897+02:00",
"source": "#Br5A6i5JoI5hSi8H",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "6",
"display": "(c) Chronic myeloproliferative diseases"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:21.108 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:21.751 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:24.180+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:24.180+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:21.752 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:22.406 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"519"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:22.406 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XFnmZgPaCl2qRpA7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19005/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:22.406 [print] {
"resourceType": "Observation",
"id": "19005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:25.486+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
> *
print COOKIES
10:02:22.406 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:22.408 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"519"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:22.408 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XFnmZgPaCl2qRpA7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19005/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:22.408 [print] {
"resourceType": "Observation",
"id": "19005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:25.486+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
> *
print COOKIES
10:02:22.408 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:23.043 [print] {
"resourceType": "Observation",
"id": "19005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:25.486+02:00",
"source": "#XFnmZgPaCl2qRpA7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "21",
"display": "(c.2) PNET"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:23.674 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:24.302 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:26.760+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:26.760+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:24.303 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:24.900 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:24.900 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qg0aCAa1XqUrR0yM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19006/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:24.901 [print] {
"resourceType": "Observation",
"id": "19006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:27.978+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
> *
print COOKIES
10:02:24.901 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:24.903 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:24.903 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qg0aCAa1XqUrR0yM"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19006/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:24.903 [print] {
"resourceType": "Observation",
"id": "19006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:27.978+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
> *
print COOKIES
10:02:24.903 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:25.544 [print] {
"resourceType": "Observation",
"id": "19006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:27.978+02:00",
"source": "#Qg0aCAa1XqUrR0yM",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:26.161 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:26.808 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:29.240+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:29.240+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:26.810 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:27.419 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:27.419 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Byw0K4aVsak8fJJv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19007/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:27.419 [print] {
"resourceType": "Observation",
"id": "19007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:30.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
> *
print COOKIES
10:02:27.419 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:27.420 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:27.420 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Byw0K4aVsak8fJJv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19007/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:27.420 [print] {
"resourceType": "Observation",
"id": "19007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:30.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
> *
print COOKIES
10:02:27.420 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:28.019 [print] {
"resourceType": "Observation",
"id": "19007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:30.496+02:00",
"source": "#Byw0K4aVsak8fJJv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "27",
"display": "(e.1) Pituitary adenomas and carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:28.661 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:29.274 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:31.739+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:31.739+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:29.275 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "113",
"display": "(a.6) Other specified malignant tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:30.927 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:30.928 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wGroPhxpltEtLSNr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19008/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19008/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:30.928 [print] {
"resourceType": "Observation",
"id": "19008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:34.003+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "113",
"display": "(a.6) Other specified malignant tumors"
}
]
}
}
> *
print COOKIES
10:02:30.928 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:30.929 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:30.929 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wGroPhxpltEtLSNr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19008/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19008/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:30.929 [print] {
"resourceType": "Observation",
"id": "19008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:34.003+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "113",
"display": "(a.6) Other specified malignant tumors"
}
]
}
}
> *
print COOKIES
10:02:30.929 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:31.580 [print] {
"resourceType": "Observation",
"id": "19008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:34.003+02:00",
"source": "#wGroPhxpltEtLSNr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-24",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "113",
"display": "(a.6) Other specified malignant tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:32.239 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:32.869 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:35.315+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:35.315+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:32.870 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "102",
"display": "(f.6) Carcinomas of breast"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:33.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:33.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"G36CTkPgFSI1Y06Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19009/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19009/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:33.493 [print] {
"resourceType": "Observation",
"id": "19009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:36.567+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "102",
"display": "(f.6) Carcinomas of breast"
}
]
}
}
> *
print COOKIES
10:02:33.493 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:33.494 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:33.494 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"G36CTkPgFSI1Y06Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19009/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19009/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:33.494 [print] {
"resourceType": "Observation",
"id": "19009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:36.567+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "102",
"display": "(f.6) Carcinomas of breast"
}
]
}
}
> *
print COOKIES
10:02:33.494 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:34.085 [print] {
"resourceType": "Observation",
"id": "19009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:36.567+02:00",
"source": "#G36CTkPgFSI1Y06Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-09-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "102",
"display": "(f.6) Carcinomas of breast"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:34.731 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:36.364 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:37.805+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:37.805+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:36.366 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:37.003 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:37.003 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SPVURH5Q7MiMoVGH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19010/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19010/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:37.003 [print] {
"resourceType": "Observation",
"id": "19010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:40.078+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
> *
print COOKIES
10:02:37.003 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:37.005 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:37.005 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SPVURH5Q7MiMoVGH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19010/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19010/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:37.005 [print] {
"resourceType": "Observation",
"id": "19010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:40.078+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
> *
print COOKIES
10:02:37.005 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:37.595 [print] {
"resourceType": "Observation",
"id": "19010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:40.078+02:00",
"source": "#SPVURH5Q7MiMoVGH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-02",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:38.211 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:38.808 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:41.293+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:41.293+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:38.810 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:39.437 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:39.438 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wAeNoJabmntCe3cg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19011/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19011/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:39.438 [print] {
"resourceType": "Observation",
"id": "19011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:42.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
> *
print COOKIES
10:02:39.438 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:39.439 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:39.439 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wAeNoJabmntCe3cg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19011/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19011/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:39.439 [print] {
"resourceType": "Observation",
"id": "19011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:42.519+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
> *
print COOKIES
10:02:39.439 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:40.058 [print] {
"resourceType": "Observation",
"id": "19011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:42.519+02:00",
"source": "#wAeNoJabmntCe3cg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:40.706 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:42.398 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:43.773+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:43.773+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:42.399 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:43.023 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:43.023 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"owlVsa7a9OHYBr4e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19012/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19012/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:43.023 [print] {
"resourceType": "Observation",
"id": "19012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:46.101+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
> *
print COOKIES
10:02:43.023 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:43.025 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:43.025 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"owlVsa7a9OHYBr4e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19012/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19012/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:43.025 [print] {
"resourceType": "Observation",
"id": "19012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:46.101+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
> *
print COOKIES
10:02:43.025 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:43.634 [print] {
"resourceType": "Observation",
"id": "19012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:46.101+02:00",
"source": "#owlVsa7a9OHYBr4e",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-16",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "54",
"display": "(a) Rhabdomyosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:44.281 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:45.286 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:47.356+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:47.356+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:45.287 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "97",
"display": "(f.1) Carcinomas of salivary glands"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:45.944 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"544"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:45.945 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IMuzYA9hn5gHy2oK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19013/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19013/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:45.945 [print] {
"resourceType": "Observation",
"id": "19013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:49.012+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "97",
"display": "(f.1) Carcinomas of salivary glands"
}
]
}
}
> *
print COOKIES
10:02:45.945 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:45.946 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"544"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:45.946 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IMuzYA9hn5gHy2oK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19013/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19013/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:45.946 [print] {
"resourceType": "Observation",
"id": "19013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:49.012+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "97",
"display": "(f.1) Carcinomas of salivary glands"
}
]
}
}
> *
print COOKIES
10:02:45.946 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:46.609 [print] {
"resourceType": "Observation",
"id": "19013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:49.012+02:00",
"source": "#IMuzYA9hn5gHy2oK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "97",
"display": "(f.1) Carcinomas of salivary glands"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:47.284 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:47.938 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:50.352+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:50.352+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:47.939 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "79",
"display": "(b.3) Embryonal carcinomas of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:48.639 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:48.639 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Vu3JJYSWougcYrKW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19014/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19014/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:48.639 [print] {
"resourceType": "Observation",
"id": "19014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:51.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "79",
"display": "(b.3) Embryonal carcinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
10:02:48.639 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:48.641 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:48.641 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Vu3JJYSWougcYrKW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19014/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19014/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:48.641 [print] {
"resourceType": "Observation",
"id": "19014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:51.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "79",
"display": "(b.3) Embryonal carcinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
10:02:48.641 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:49.291 [print] {
"resourceType": "Observation",
"id": "19014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:51.711+02:00",
"source": "#Vu3JJYSWougcYrKW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "79",
"display": "(b.3) Embryonal carcinomas of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:49.924 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:50.544 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:52.999+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:52.999+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:50.545 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:51.195 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:51.195 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WEadkJMdp1j1MCqy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19015/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19015/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:51.195 [print] {
"resourceType": "Observation",
"id": "19015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:54.255+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
> *
print COOKIES
10:02:51.195 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:51.196 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:51.196 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WEadkJMdp1j1MCqy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19015/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19015/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:51.196 [print] {
"resourceType": "Observation",
"id": "19015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:54.255+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
> *
print COOKIES
10:02:51.196 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:51.871 [print] {
"resourceType": "Observation",
"id": "19015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:54.255+02:00",
"source": "#WEadkJMdp1j1MCqy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "31",
"display": "(e.5) Meningiomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:52.530 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:53.411 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:55.604+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:55.604+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:53.413 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:54.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:54.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4sZmz3swiMutjYbO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19016/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19016/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:54.070 [print] {
"resourceType": "Observation",
"id": "19016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:57.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
> *
print COOKIES
10:02:54.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:54.072 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:54.072 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4sZmz3swiMutjYbO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19016/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19016/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:54.072 [print] {
"resourceType": "Observation",
"id": "19016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:57.143+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
> *
print COOKIES
10:02:54.072 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:54.686 [print] {
"resourceType": "Observation",
"id": "19016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:57.143+02:00",
"source": "#4sZmz3swiMutjYbO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-03-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:55.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:55.913 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:02:58.401+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:02:58.401+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:55.914 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "40",
"display": "(b) Renal carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:56.540 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:56.540 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B6IYqX71WouVzeys"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19017/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19017/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:56.540 [print] {
"resourceType": "Observation",
"id": "19017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:59.615+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "40",
"display": "(b) Renal carcinomas"
}
]
}
}
> *
print COOKIES
10:02:56.540 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:02:56.541 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:02:56.541 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B6IYqX71WouVzeys"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19017/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:02:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19017/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:02:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:02:56.541 [print] {
"resourceType": "Observation",
"id": "19017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:59.615+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "40",
"display": "(b) Renal carcinomas"
}
]
}
}
> *
print COOKIES
10:02:56.541 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:02:57.162 [print] {
"resourceType": "Observation",
"id": "19017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:02:59.615+02:00",
"source": "#B6IYqX71WouVzeys",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "40",
"display": "(b) Renal carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:02:58.114 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:02:58.734 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:01.186+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:01.186+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:02:58.735 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "87",
"display": "(c.5) Gonadal choriocarcinoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:00.408 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:00.408 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TYX1vodoBM2ywINN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19018/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19018/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:00.408 [print] {
"resourceType": "Observation",
"id": "19018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:03.474+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "87",
"display": "(c.5) Gonadal choriocarcinoma"
}
]
}
}
> *
print COOKIES
10:03:00.408 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:00.410 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:00.410 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TYX1vodoBM2ywINN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19018/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19018/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:00.410 [print] {
"resourceType": "Observation",
"id": "19018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:03.474+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "87",
"display": "(c.5) Gonadal choriocarcinoma"
}
]
}
}
> *
print COOKIES
10:03:00.410 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:01.020 [print] {
"resourceType": "Observation",
"id": "19018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:03.474+02:00",
"source": "#TYX1vodoBM2ywINN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "87",
"display": "(c.5) Gonadal choriocarcinoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:01.628 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:02.256 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:04.704+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:04.704+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:02.258 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "98",
"display": "(f.2) Carcinomas of colon and rectum"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:02.892 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"545"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:02.892 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zin6Dh4CEpJCHtH4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19019/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19019/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:02.892 [print] {
"resourceType": "Observation",
"id": "19019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:05.964+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "98",
"display": "(f.2) Carcinomas of colon and rectum"
}
]
}
}
> *
print COOKIES
10:03:02.892 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:02.893 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"545"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:02.894 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zin6Dh4CEpJCHtH4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19019/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19019/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:02.894 [print] {
"resourceType": "Observation",
"id": "19019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:05.964+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "98",
"display": "(f.2) Carcinomas of colon and rectum"
}
]
}
}
> *
print COOKIES
10:03:02.894 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:03.527 [print] {
"resourceType": "Observation",
"id": "19019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:05.964+02:00",
"source": "#zin6Dh4CEpJCHtH4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-01-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "98",
"display": "(f.2) Carcinomas of colon and rectum"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:04.205 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:04.837 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:07.288+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:07.288+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:04.838 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:05.535 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:05.535 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tqvJ74CDkxqS161q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19020/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19020/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:05.535 [print] {
"resourceType": "Observation",
"id": "19020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:08.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
> *
print COOKIES
10:03:05.535 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:05.537 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:05.537 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tqvJ74CDkxqS161q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19020/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19020/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:05.537 [print] {
"resourceType": "Observation",
"id": "19020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:08.573+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
> *
print COOKIES
10:03:05.537 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:06.208 [print] {
"resourceType": "Observation",
"id": "19020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:08.573+02:00",
"source": "#tqvJ74CDkxqS161q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "18",
"display": "(a.2) Choroid plexus tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:06.834 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:07.439 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:09.904+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:09.904+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:07.440 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:08.097 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:08.097 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DxTsX5a6ujj0OpP6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19021/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19021/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:08.097 [print] {
"resourceType": "Observation",
"id": "19021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:11.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
> *
print COOKIES
10:03:08.097 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:08.098 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:08.098 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DxTsX5a6ujj0OpP6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19021/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19021/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:08.098 [print] {
"resourceType": "Observation",
"id": "19021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:11.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
> *
print COOKIES
10:03:08.098 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:08.692 [print] {
"resourceType": "Observation",
"id": "19021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:11.172+02:00",
"source": "#DxTsX5a6ujj0OpP6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-05-09",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "24",
"display": "(d.1) Oligodendrogliomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:09.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:09.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:12.400+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:12.400+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:09.923 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:10.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"555"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:10.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eHZAEztvFl3U2Wyo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19022/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19022/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:10.546 [print] {
"resourceType": "Observation",
"id": "19022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:13.616+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
> *
print COOKIES
10:03:10.546 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:10.548 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"555"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:10.548 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eHZAEztvFl3U2Wyo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19022/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19022/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:10.548 [print] {
"resourceType": "Observation",
"id": "19022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:13.616+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
> *
print COOKIES
10:03:10.548 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:11.176 [print] {
"resourceType": "Observation",
"id": "19022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:13.616+02:00",
"source": "#eHZAEztvFl3U2Wyo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-11-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:11.839 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:12.453 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:14.921+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:14.921+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:12.455 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:13.084 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:13.084 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IISc7vRgaTwZdFG5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19023/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19023/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:13.084 [print] {
"resourceType": "Observation",
"id": "19023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:16.161+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
> *
print COOKIES
10:03:13.084 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:13.086 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:13.086 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"IISc7vRgaTwZdFG5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19023/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19023/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:13.086 [print] {
"resourceType": "Observation",
"id": "19023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:16.161+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
> *
print COOKIES
10:03:13.086 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:13.690 [print] {
"resourceType": "Observation",
"id": "19023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:16.161+02:00",
"source": "#IISc7vRgaTwZdFG5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-02-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:14.313 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:14.926 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:17.391+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:17.391+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:14.928 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:15.553 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:15.553 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7OfRzyTSON8trIwX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19024/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19024/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:15.553 [print] {
"resourceType": "Observation",
"id": "19024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:18.624+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
> *
print COOKIES
10:03:15.553 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:15.555 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:15.555 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7OfRzyTSON8trIwX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19024/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19024/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:15.555 [print] {
"resourceType": "Observation",
"id": "19024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:18.624+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
> *
print COOKIES
10:03:15.555 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:16.160 [print] {
"resourceType": "Observation",
"id": "19024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:18.624+02:00",
"source": "#7OfRzyTSON8trIwX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "22",
"display": "(c.3) Medulloepithelioma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:16.799 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:17.425 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:19.865+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:19.865+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:17.426 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:18.048 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:18.048 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JBMV3AWKHamYhm6n"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19025/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19025/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:18.048 [print] {
"resourceType": "Observation",
"id": "19025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:21.123+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
> *
print COOKIES
10:03:18.048 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:18.050 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"552"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:18.050 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JBMV3AWKHamYhm6n"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19025/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19025/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:18.050 [print] {
"resourceType": "Observation",
"id": "19025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:21.123+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
> *
print COOKIES
10:03:18.050 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:18.712 [print] {
"resourceType": "Observation",
"id": "19025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:21.123+02:00",
"source": "#JBMV3AWKHamYhm6n",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-12-25",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "15",
"display": "(d) Miscellaneous lymphoreticular neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:19.737 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:20.339 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:22.821+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:22.821+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:20.340 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "70",
"display": "(e) Unspecified soft tissue sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:20.969 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"545"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:20.969 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"q85577IEjp0TI4Gd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19026/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19026/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:20.970 [print] {
"resourceType": "Observation",
"id": "19026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:24.037+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "70",
"display": "(e) Unspecified soft tissue sarcomas"
}
]
}
}
> *
print COOKIES
10:03:20.970 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:20.971 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"545"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:20.971 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"q85577IEjp0TI4Gd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19026/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19026/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:20.971 [print] {
"resourceType": "Observation",
"id": "19026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:24.037+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "70",
"display": "(e) Unspecified soft tissue sarcomas"
}
]
}
}
> *
print COOKIES
10:03:20.971 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:21.591 [print] {
"resourceType": "Observation",
"id": "19026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:24.037+02:00",
"source": "#q85577IEjp0TI4Gd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "70",
"display": "(e) Unspecified soft tissue sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:22.226 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:22.872 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:25.298+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:25.298+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:22.873 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:23.530 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:23.530 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KiLjcDTr5I5ajeze"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19027/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19027/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:23.530 [print] {
"resourceType": "Observation",
"id": "19027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:26.605+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
> *
print COOKIES
10:03:23.530 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:23.533 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:23.533 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KiLjcDTr5I5ajeze"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19027/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19027/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:23.533 [print] {
"resourceType": "Observation",
"id": "19027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:26.605+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
> *
print COOKIES
10:03:23.533 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:24.436 [print] {
"resourceType": "Observation",
"id": "19027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:26.605+02:00",
"source": "#KiLjcDTr5I5ajeze",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "60",
"display": "(d.2) pPNET of soft tissue"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:25.042 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:25.675 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:28.123+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:28.123+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:25.677 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "114",
"display": "(b) Other unspecified malignant tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:26.317 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:26.317 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zuAgzMH3ppZrt9P6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19028/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19028/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:26.317 [print] {
"resourceType": "Observation",
"id": "19028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:29.390+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "114",
"display": "(b) Other unspecified malignant tumors"
}
]
}
}
> *
print COOKIES
10:03:26.317 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:26.318 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:26.319 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zuAgzMH3ppZrt9P6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19028/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19028/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:26.319 [print] {
"resourceType": "Observation",
"id": "19028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:29.390+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "114",
"display": "(b) Other unspecified malignant tumors"
}
]
}
}
> *
print COOKIES
10:03:26.319 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:26.951 [print] {
"resourceType": "Observation",
"id": "19028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:29.390+02:00",
"source": "#zuAgzMH3ppZrt9P6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "114",
"display": "(b) Other unspecified malignant tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:27.570 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:28.189 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:30.644+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:30.644+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:28.191 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:28.794 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:28.794 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YlbW9jU7go3UVQNl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19029/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19029/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:28.794 [print] {
"resourceType": "Observation",
"id": "19029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:31.871+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
> *
print COOKIES
10:03:28.794 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:28.796 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"550"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:28.796 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YlbW9jU7go3UVQNl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19029/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19029/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:28.796 [print] {
"resourceType": "Observation",
"id": "19029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:31.871+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
> *
print COOKIES
10:03:28.796 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:29.396 [print] {
"resourceType": "Observation",
"id": "19029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:31.871+02:00",
"source": "#YlbW9jU7go3UVQNl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-06-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "52",
"display": "(d.4) Miscellaneous malignant bone tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:30.049 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:30.742 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:33.125+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:33.125+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:30.743 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:31.408 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:31.408 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LLjHIYJK7lP62NsJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19030/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19030/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:31.408 [print] {
"resourceType": "Observation",
"id": "19030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:34.485+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
> *
print COOKIES
10:03:31.408 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:31.410 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:31.410 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LLjHIYJK7lP62NsJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19030/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19030/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:31.410 [print] {
"resourceType": "Observation",
"id": "19030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:34.485+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
> *
print COOKIES
10:03:31.410 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:33.064 [print] {
"resourceType": "Observation",
"id": "19030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:34.485+02:00",
"source": "#LLjHIYJK7lP62NsJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "65",
"display": "(d.7) Synovial sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:34.696 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:35.335 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:37.755+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:37.755+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:35.336 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "46",
"display": "(b) Chondrosarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:35.975 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:35.975 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SchbowAVPqbXRRdh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19031/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19031/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:35.975 [print] {
"resourceType": "Observation",
"id": "19031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:39.050+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "46",
"display": "(b) Chondrosarcomas"
}
]
}
}
> *
print COOKIES
10:03:35.975 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:35.977 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:35.977 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SchbowAVPqbXRRdh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19031/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19031/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:35.977 [print] {
"resourceType": "Observation",
"id": "19031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:39.050+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "46",
"display": "(b) Chondrosarcomas"
}
]
}
}
> *
print COOKIES
10:03:35.977 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:36.620 [print] {
"resourceType": "Observation",
"id": "19031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:39.050+02:00",
"source": "#SchbowAVPqbXRRdh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "46",
"display": "(b) Chondrosarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:37.327 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:37.991 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:40.399+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:40.399+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:37.992 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:38.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:38.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5fqCLYR66VefjQhO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19032/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19032/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:38.620 [print] {
"resourceType": "Observation",
"id": "19032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:41.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
> *
print COOKIES
10:03:38.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:38.621 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:38.621 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5fqCLYR66VefjQhO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19032/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19032/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:38.621 [print] {
"resourceType": "Observation",
"id": "19032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:41.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
> *
print COOKIES
10:03:38.621 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:39.247 [print] {
"resourceType": "Observation",
"id": "19032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:41.700+02:00",
"source": "#5fqCLYR66VefjQhO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:39.852 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:40.507 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:42.933+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:42.933+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:40.509 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:41.130 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:41.130 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MLlLC6KtJocICujC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19033/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19033/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:41.130 [print] {
"resourceType": "Observation",
"id": "19033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:44.203+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
> *
print COOKIES
10:03:41.130 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:41.133 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:41.133 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MLlLC6KtJocICujC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19033/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19033/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:41.133 [print] {
"resourceType": "Observation",
"id": "19033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:44.203+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
> *
print COOKIES
10:03:41.133 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:41.744 [print] {
"resourceType": "Observation",
"id": "19033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:44.203+02:00",
"source": "#MLlLC6KtJocICujC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "14",
"display": "(c) Burkitt lymphoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:42.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:43.074 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:45.488+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:45.488+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:43.076 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "76",
"display": "(a.6) Intracranial and intraspinal tumors of mixed forms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:43.692 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"565"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:43.692 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D2W0IEQA1GTzPOUJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19034/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19034/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:43.693 [print] {
"resourceType": "Observation",
"id": "19034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:46.762+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "76",
"display": "(a.6) Intracranial and intraspinal tumors of mixed forms"
}
]
}
}
> *
print COOKIES
10:03:43.693 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:43.694 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"565"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:43.694 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"D2W0IEQA1GTzPOUJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19034/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19034/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:43.694 [print] {
"resourceType": "Observation",
"id": "19034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:46.762+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "76",
"display": "(a.6) Intracranial and intraspinal tumors of mixed forms"
}
]
}
}
> *
print COOKIES
10:03:43.694 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:44.741 [print] {
"resourceType": "Observation",
"id": "19034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:46.762+02:00",
"source": "#D2W0IEQA1GTzPOUJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-06",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "76",
"display": "(a.6) Intracranial and intraspinal tumors of mixed forms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:45.361 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:45.977 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:48.445+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:48.445+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:45.978 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:46.591 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:46.591 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0wdIcY7gIsx9T5WZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19035/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19035/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:46.591 [print] {
"resourceType": "Observation",
"id": "19035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:49.670+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
> *
print COOKIES
10:03:46.591 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:46.592 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:46.592 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0wdIcY7gIsx9T5WZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19035/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19035/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:46.592 [print] {
"resourceType": "Observation",
"id": "19035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:49.670+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
> *
print COOKIES
10:03:46.592 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:47.237 [print] {
"resourceType": "Observation",
"id": "19035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:49.670+02:00",
"source": "#0wdIcY7gIsx9T5WZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-12-10",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "51",
"display": "(d.3) Odontogenic malignant tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:47.864 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:48.506 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:50.934+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:50.934+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:48.508 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:49.173 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:49.173 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"igyWDrG5xQkJ8Jiv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19036/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19036/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:49.173 [print] {
"resourceType": "Observation",
"id": "19036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:52.239+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
10:03:49.173 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:49.174 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:49.174 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"igyWDrG5xQkJ8Jiv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19036/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19036/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:49.175 [print] {
"resourceType": "Observation",
"id": "19036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:52.239+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
10:03:49.175 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:49.877 [print] {
"resourceType": "Observation",
"id": "19036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:52.239+02:00",
"source": "#igyWDrG5xQkJ8Jiv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:51.535 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:52.212 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:54.604+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:54.604+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:52.215 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:52.905 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:52.905 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Nz1fBI3zzroVTnXn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19037/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19037/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:52.905 [print] {
"resourceType": "Observation",
"id": "19037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:55.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
> *
print COOKIES
10:03:52.905 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:52.907 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:52.907 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Nz1fBI3zzroVTnXn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19037/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19037/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:52.907 [print] {
"resourceType": "Observation",
"id": "19037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:55.948+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
> *
print COOKIES
10:03:52.907 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:53.576 [print] {
"resourceType": "Observation",
"id": "19037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:55.948+02:00",
"source": "#Nz1fBI3zzroVTnXn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "61",
"display": "(d.3) Extrarenal rhabdoid tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:54.230 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:54.880 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:57.303+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:57.303+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:54.882 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:55.530 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:55.530 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CozObbWzGz86V4uQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19038/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19038/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:55.530 [print] {
"resourceType": "Observation",
"id": "19038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:58.604+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
> *
print COOKIES
10:03:55.530 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:55.532 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:55.532 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CozObbWzGz86V4uQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19038/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:03:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19038/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:03:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:55.533 [print] {
"resourceType": "Observation",
"id": "19038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:58.604+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
> *
print COOKIES
10:03:55.533 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:56.255 [print] {
"resourceType": "Observation",
"id": "19038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:03:58.604+02:00",
"source": "#CozObbWzGz86V4uQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "48",
"display": "(c.2) pPNET of bone"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:03:56.880 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:03:57.560 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:03:59.957+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:03:59.957+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:03:57.562 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "112",
"display": "(a.5) Mesothelioma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:58.254 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:58.254 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AvNO8j9OjPnixMtB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19039/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19039/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:58.254 [print] {
"resourceType": "Observation",
"id": "19039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:01.312+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "112",
"display": "(a.5) Mesothelioma"
}
]
}
}
> *
print COOKIES
10:03:58.254 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:03:58.256 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:03:58.256 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AvNO8j9OjPnixMtB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19039/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19039/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:03:58.256 [print] {
"resourceType": "Observation",
"id": "19039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:01.312+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "112",
"display": "(a.5) Mesothelioma"
}
]
}
}
> *
print COOKIES
10:03:58.256 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:03:59.898 [print] {
"resourceType": "Observation",
"id": "19039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:01.312+02:00",
"source": "#AvNO8j9OjPnixMtB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "112",
"display": "(a.5) Mesothelioma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:00.501 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:01.185 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:03.583+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:03.583+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:01.186 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:01.838 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:01.838 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1Owfa1c9V7JDyutG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19040/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19040/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:01.838 [print] {
"resourceType": "Observation",
"id": "19040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:04.905+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
> *
print COOKIES
10:04:01.838 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:01.840 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:01.840 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1Owfa1c9V7JDyutG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19040/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19040/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:01.840 [print] {
"resourceType": "Observation",
"id": "19040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:04.905+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
> *
print COOKIES
10:04:01.840 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:02.493 [print] {
"resourceType": "Observation",
"id": "19040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:04.905+02:00",
"source": "#1Owfa1c9V7JDyutG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-06-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "50",
"display": "(d.2) Malignant chordomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:03.135 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:03.773 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:06.213+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:06.213+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:03.775 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:04.443 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:04.443 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dyAAcgMNQdk7OuxN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19041/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19041/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:04.443 [print] {
"resourceType": "Observation",
"id": "19041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:07.509+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
> *
print COOKIES
10:04:04.443 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:04.445 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"534"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:04.445 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dyAAcgMNQdk7OuxN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19041/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19041/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:04.445 [print] {
"resourceType": "Observation",
"id": "19041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:07.509+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
> *
print COOKIES
10:04:04.445 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:05.112 [print] {
"resourceType": "Observation",
"id": "19041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:07.509+02:00",
"source": "#dyAAcgMNQdk7OuxN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-08-28",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "66",
"display": "(d.8) Blood vessel tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:05.723 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:07.662 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:08.806+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:08.806+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:07.664 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:08.309 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:08.309 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o0lfMMjxi2En71CR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19042/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19042/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:08.309 [print] {
"resourceType": "Observation",
"id": "19042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:11.384+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
> *
print COOKIES
10:04:08.309 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:08.311 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:08.311 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"o0lfMMjxi2En71CR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19042/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19042/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:08.311 [print] {
"resourceType": "Observation",
"id": "19042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:11.384+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
> *
print COOKIES
10:04:08.311 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:09.228 [print] {
"resourceType": "Observation",
"id": "19042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:11.384+02:00",
"source": "#o0lfMMjxi2En71CR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:09.889 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:10.522 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:12.969+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:12.969+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:10.524 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:11.249 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:11.249 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sHb8qed6Uv4c4xxw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19043/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19043/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:11.249 [print] {
"resourceType": "Observation",
"id": "19043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:14.323+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
> *
print COOKIES
10:04:11.249 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:11.251 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:11.251 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sHb8qed6Uv4c4xxw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19043/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19043/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:11.251 [print] {
"resourceType": "Observation",
"id": "19043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:14.323+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
> *
print COOKIES
10:04:11.251 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:11.902 [print] {
"resourceType": "Observation",
"id": "19043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:14.323+02:00",
"source": "#sHb8qed6Uv4c4xxw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-01-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:12.548 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:13.218 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:15.629+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:15.629+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:13.219 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:13.852 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:13.852 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GVJDujcpvVebLoU4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19044/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19044/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:13.852 [print] {
"resourceType": "Observation",
"id": "19044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:16.922+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
> *
print COOKIES
10:04:13.852 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:13.854 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:13.854 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GVJDujcpvVebLoU4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19044/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19044/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:13.854 [print] {
"resourceType": "Observation",
"id": "19044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:16.922+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
> *
print COOKIES
10:04:13.854 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:14.528 [print] {
"resourceType": "Observation",
"id": "19044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:16.922+02:00",
"source": "#GVJDujcpvVebLoU4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "4",
"display": "(a.4) Lymphoid leukemia, NOS"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:15.193 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:15.846 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:18.276+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:18.276+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:15.848 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:16.484 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:16.484 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"USVXUXUTC7dCwOhK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19045/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19045/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:16.484 [print] {
"resourceType": "Observation",
"id": "19045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:19.539+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
> *
print COOKIES
10:04:16.484 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:16.486 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"540"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:16.487 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"USVXUXUTC7dCwOhK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19045/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19045/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:16.487 [print] {
"resourceType": "Observation",
"id": "19045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:19.539+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
> *
print COOKIES
10:04:16.487 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:17.108 [print] {
"resourceType": "Observation",
"id": "19045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:19.539+02:00",
"source": "#USVXUXUTC7dCwOhK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-20",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "29",
"display": "(e.3) Pineal parenchymal tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:17.749 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:18.571 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:20.814+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:20.814+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:18.573 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:19.220 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:19.220 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ouFGmryZFmlemP7e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19046/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19046/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:19.220 [print] {
"resourceType": "Observation",
"id": "19046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:22.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
> *
print COOKIES
10:04:19.220 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:19.221 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"527"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:19.221 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ouFGmryZFmlemP7e"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19046/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19046/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:19.221 [print] {
"resourceType": "Observation",
"id": "19046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:22.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
> *
print COOKIES
10:04:19.221 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:19.859 [print] {
"resourceType": "Observation",
"id": "19046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:22.269+02:00",
"source": "#ouFGmryZFmlemP7e",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-10-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "58",
"display": "(c) Kaposi sarcoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:20.515 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 18ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 18ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:21.121 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:23.568+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:23.568+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:21.123 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-02-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:21.748 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"539"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:21.748 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7ZUihYyQPUjyZn8p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19047/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19047/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:21.748 [print] {
"resourceType": "Observation",
"id": "19047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:24.826+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-02-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
> *
print COOKIES
10:04:21.748 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:21.749 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"539"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:21.749 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7ZUihYyQPUjyZn8p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19047/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19047/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:21.749 [print] {
"resourceType": "Observation",
"id": "19047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:24.826+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-02-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
> *
print COOKIES
10:04:21.749 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:22.373 [print] {
"resourceType": "Observation",
"id": "19047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:24.826+02:00",
"source": "#7ZUihYyQPUjyZn8p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-02-26",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "10",
"display": "(b.1) Precursor cell lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:23.036 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:23.678 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:26.108+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:26.108+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:23.678 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:25.309 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:25.309 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kMLeGyu5smjZXcCN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19048/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19048/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:25.310 [print] {
"resourceType": "Observation",
"id": "19048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:28.378+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
> *
print COOKIES
10:04:25.310 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:25.311 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:25.311 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kMLeGyu5smjZXcCN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19048/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19048/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:25.311 [print] {
"resourceType": "Observation",
"id": "19048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:28.378+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
> *
print COOKIES
10:04:25.311 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:26.317 [print] {
"resourceType": "Observation",
"id": "19048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:28.378+02:00",
"source": "#kMLeGyu5smjZXcCN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-03-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "39",
"display": "(a.4) pPNET of kidney"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:26.955 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:27.609 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:30.010+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:30.010+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:27.611 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:28.424 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:28.424 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ziy49KG5GgJHyGuJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19049/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19049/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:28.424 [print] {
"resourceType": "Observation",
"id": "19049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:31.499+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
> *
print COOKIES
10:04:28.424 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:28.426 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"549"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:28.426 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ziy49KG5GgJHyGuJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19049/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19049/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:28.426 [print] {
"resourceType": "Observation",
"id": "19049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:31.499+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
> *
print COOKIES
10:04:28.426 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:29.081 [print] {
"resourceType": "Observation",
"id": "19049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:31.499+02:00",
"source": "#ziy49KG5GgJHyGuJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-11",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "44",
"display": "(c) Unspecified malignant hepatic tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:29.719 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:30.656 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:32.797+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:32.797+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:30.658 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "85",
"display": "(c.3) Gonadal embryonal carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:31.285 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:31.285 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"syCZGmb4EqfjEIBh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19050/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19050/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:31.285 [print] {
"resourceType": "Observation",
"id": "19050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:34.361+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "85",
"display": "(c.3) Gonadal embryonal carcinomas"
}
]
}
}
> *
print COOKIES
10:04:31.285 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:31.287 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:31.287 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"syCZGmb4EqfjEIBh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19050/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19050/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:31.287 [print] {
"resourceType": "Observation",
"id": "19050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:34.361+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "85",
"display": "(c.3) Gonadal embryonal carcinomas"
}
]
}
}
> *
print COOKIES
10:04:31.287 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:31.905 [print] {
"resourceType": "Observation",
"id": "19050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:34.361+02:00",
"source": "#syCZGmb4EqfjEIBh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "85",
"display": "(c.3) Gonadal embryonal carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:32.535 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:33.186 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:35.614+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:35.614+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:33.188 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:33.875 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:33.875 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qNyDskMSEAyQZlZe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19051/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19051/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:33.875 [print] {
"resourceType": "Observation",
"id": "19051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:36.932+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
> *
print COOKIES
10:04:33.875 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:33.877 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:33.877 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qNyDskMSEAyQZlZe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19051/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19051/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:33.877 [print] {
"resourceType": "Observation",
"id": "19051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:36.932+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
> *
print COOKIES
10:04:33.877 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:34.545 [print] {
"resourceType": "Observation",
"id": "19051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:36.932+02:00",
"source": "#qNyDskMSEAyQZlZe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-08-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "9",
"display": "(a) Hodgkin lymphomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:35.166 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:35.836 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:38.249+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:38.249+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:35.845 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "105",
"display": "(f.9) Carcinomas of eye"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:36.475 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:36.476 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y4i6maUu6pcDodFZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19052/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19052/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:36.476 [print] {
"resourceType": "Observation",
"id": "19052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:39.536+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "105",
"display": "(f.9) Carcinomas of eye"
}
]
}
}
> *
print COOKIES
10:04:36.476 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:36.477 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"533"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:36.477 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Y4i6maUu6pcDodFZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19052/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19052/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:36.477 [print] {
"resourceType": "Observation",
"id": "19052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:39.536+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "105",
"display": "(f.9) Carcinomas of eye"
}
]
}
}
> *
print COOKIES
10:04:36.477 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:37.091 [print] {
"resourceType": "Observation",
"id": "19052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:39.536+02:00",
"source": "#Y4i6maUu6pcDodFZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-02-05",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "105",
"display": "(f.9) Carcinomas of eye"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:37.728 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:38.366 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:40.805+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:40.805+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:38.367 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:38.992 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"551"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:38.992 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CmdOqtCrqvIoFLNG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19053/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19053/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:38.992 [print] {
"resourceType": "Observation",
"id": "19053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:42.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
> *
print COOKIES
10:04:38.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:38.994 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"551"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:38.994 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CmdOqtCrqvIoFLNG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19053/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19053/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:38.994 [print] {
"resourceType": "Observation",
"id": "19053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:42.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
> *
print COOKIES
10:04:38.994 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:39.592 [print] {
"resourceType": "Observation",
"id": "19053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:42.065+02:00",
"source": "#CmdOqtCrqvIoFLNG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-08-30",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "33",
"display": "(a) Neuroblastoma and ganglioneuroblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:40.198 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:40.814 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:43.277+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:43.277+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:40.815 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "83",
"display": "(c.1) Malignant gonadal germinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:41.461 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:41.461 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xrvnW7PsyLJCaWJk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19054/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19054/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:41.461 [print] {
"resourceType": "Observation",
"id": "19054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:44.539+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "83",
"display": "(c.1) Malignant gonadal germinomas"
}
]
}
}
> *
print COOKIES
10:04:41.461 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:41.463 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"543"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:41.463 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xrvnW7PsyLJCaWJk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19054/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19054/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:41.463 [print] {
"resourceType": "Observation",
"id": "19054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:44.539+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "83",
"display": "(c.1) Malignant gonadal germinomas"
}
]
}
}
> *
print COOKIES
10:04:41.463 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:42.080 [print] {
"resourceType": "Observation",
"id": "19054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:44.539+02:00",
"source": "#xrvnW7PsyLJCaWJk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-07",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "83",
"display": "(c.1) Malignant gonadal germinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:42.717 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:43.340 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:45.797+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:45.797+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:43.341 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "84",
"display": "(c.2) Malignant gonadal teratomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:44.067 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:44.067 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yeeCG7JNn9NX6LAD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19055/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19055/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:44.067 [print] {
"resourceType": "Observation",
"id": "19055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:47.099+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "84",
"display": "(c.2) Malignant gonadal teratomas"
}
]
}
}
> *
print COOKIES
10:04:44.067 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:44.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:44.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yeeCG7JNn9NX6LAD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19055/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19055/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:44.069 [print] {
"resourceType": "Observation",
"id": "19055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:47.099+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "84",
"display": "(c.2) Malignant gonadal teratomas"
}
]
}
}
> *
print COOKIES
10:04:44.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:44.716 [print] {
"resourceType": "Observation",
"id": "19055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:47.099+02:00",
"source": "#yeeCG7JNn9NX6LAD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-01-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "84",
"display": "(c.2) Malignant gonadal teratomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:45.383 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:46.008 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:48.455+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:48.455+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:46.010 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "94",
"display": "(c) Nasopharyngeal carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:46.647 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:46.647 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"G5czDCZrDdfdIIyF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19056/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19056/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:46.647 [print] {
"resourceType": "Observation",
"id": "19056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:49.724+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "94",
"display": "(c) Nasopharyngeal carcinomas"
}
]
}
}
> *
print COOKIES
10:04:46.647 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:46.648 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:46.648 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"G5czDCZrDdfdIIyF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19056/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19056/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:46.648 [print] {
"resourceType": "Observation",
"id": "19056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:49.724+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "94",
"display": "(c) Nasopharyngeal carcinomas"
}
]
}
}
> *
print COOKIES
10:04:46.648 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:47.289 [print] {
"resourceType": "Observation",
"id": "19056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:49.724+02:00",
"source": "#G5czDCZrDdfdIIyF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-29",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "94",
"display": "(c) Nasopharyngeal carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:47.950 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:48.586 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:51.009+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:51.009+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:48.587 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-07-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:49.240 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:49.240 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w2gG9jeKqVV1LWdt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19057/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19057/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:49.240 [print] {
"resourceType": "Observation",
"id": "19057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:52.318+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-07-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
> *
print COOKIES
10:04:49.240 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:49.242 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:49.242 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w2gG9jeKqVV1LWdt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19057/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19057/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:49.242 [print] {
"resourceType": "Observation",
"id": "19057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:52.318+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-07-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
> *
print COOKIES
10:04:49.242 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:50.133 [print] {
"resourceType": "Observation",
"id": "19057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:52.318+02:00",
"source": "#w2gG9jeKqVV1LWdt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-07-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "37",
"display": "(a.2) Rhabdoid renal tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:50.779 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:51.413 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:53.846+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:53.846+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:51.414 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:52.067 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:52.067 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wL9zAIRnOdBFBYLD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19058/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19058/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:52.067 [print] {
"resourceType": "Observation",
"id": "19058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:55.119+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
> *
print COOKIES
10:04:52.067 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:52.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:52.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wL9zAIRnOdBFBYLD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19058/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19058/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:52.069 [print] {
"resourceType": "Observation",
"id": "19058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:55.119+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
> *
print COOKIES
10:04:52.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:52.693 [print] {
"resourceType": "Observation",
"id": "19058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:55.119+02:00",
"source": "#wL9zAIRnOdBFBYLD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "26",
"display": "(d.3) Neuroepithelial glial tumors of uncertain origin"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:53.325 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:53.952 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:56.400+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:56.400+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:53.953 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "101",
"display": "(f.5) Carcinomas of thymus"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:54.566 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:54.566 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zHqfefRl7nY2x7Ot"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19059/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19059/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:54.566 [print] {
"resourceType": "Observation",
"id": "19059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:57.645+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "101",
"display": "(f.5) Carcinomas of thymus"
}
]
}
}
> *
print COOKIES
10:04:54.566 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:54.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"536"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:54.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zHqfefRl7nY2x7Ot"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19059/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:04:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19059/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:54.568 [print] {
"resourceType": "Observation",
"id": "19059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:57.645+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "101",
"display": "(f.5) Carcinomas of thymus"
}
]
}
}
> *
print COOKIES
10:04:54.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:55.226 [print] {
"resourceType": "Observation",
"id": "19059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:04:57.645+02:00",
"source": "#zHqfefRl7nY2x7Ot",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-07-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "101",
"display": "(f.5) Carcinomas of thymus"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:55.888 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:56.506 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:04:58.966+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:04:58.966+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:56.507 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "99",
"display": "(f.3) Carcinomas of appendix"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:57.111 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:57.111 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4Eo1MWHjy4UAUE51"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19060/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19060/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:57.111 [print] {
"resourceType": "Observation",
"id": "19060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:00.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "99",
"display": "(f.3) Carcinomas of appendix"
}
]
}
}
> *
print COOKIES
10:04:57.111 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:57.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:57.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4Eo1MWHjy4UAUE51"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19060/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19060/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:04:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:57.113 [print] {
"resourceType": "Observation",
"id": "19060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:00.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "99",
"display": "(f.3) Carcinomas of appendix"
}
]
}
}
> *
print COOKIES
10:04:57.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:04:57.755 [print] {
"resourceType": "Observation",
"id": "19060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:00.186+02:00",
"source": "#4Eo1MWHjy4UAUE51",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-03-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "99",
"display": "(f.3) Carcinomas of appendix"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:04:58.376 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:04:59.008 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:01.456+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:01.456+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:04:59.010 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "81",
"display": "(b.5) Choriocarcinomas of extracranial and extragonadal sites"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:59.641 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"570"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:59.641 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mcIB3TZbL5ilUwlW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19061/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19061/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:59.641 [print] {
"resourceType": "Observation",
"id": "19061",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:02.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "81",
"display": "(b.5) Choriocarcinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
10:04:59.641 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:04:59.643 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"570"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:04:59.643 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mcIB3TZbL5ilUwlW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19061/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19061/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:04:59.643 [print] {
"resourceType": "Observation",
"id": "19061",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:02.722+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "81",
"display": "(b.5) Choriocarcinomas of extracranial and extragonadal sites"
}
]
}
}
> *
print COOKIES
10:04:59.643 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:00.265 [print] {
"resourceType": "Observation",
"id": "19061",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:02.722+02:00",
"source": "#mcIB3TZbL5ilUwlW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-07-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "81",
"display": "(b.5) Choriocarcinomas of extracranial and extragonadal sites"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:00.933 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:01.561 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:04.010+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:04.010+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:01.562 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "104",
"display": "(f.8) Carcinomas of bladder"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:02.211 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:02.211 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pZybi2aqpetactZ9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19062/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19062/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:02.211 [print] {
"resourceType": "Observation",
"id": "19062",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:05.274+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "104",
"display": "(f.8) Carcinomas of bladder"
}
]
}
}
> *
print COOKIES
10:05:02.211 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:02.213 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:02.213 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pZybi2aqpetactZ9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19062/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19062/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:02.213 [print] {
"resourceType": "Observation",
"id": "19062",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:05.274+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "104",
"display": "(f.8) Carcinomas of bladder"
}
]
}
}
> *
print COOKIES
10:05:02.213 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:02.824 [print] {
"resourceType": "Observation",
"id": "19062",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:05.274+02:00",
"source": "#pZybi2aqpetactZ9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-10-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "104",
"display": "(f.8) Carcinomas of bladder"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:03.442 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:04.057 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:06.521+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:06.521+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:04.059 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:04.696 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:04.696 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"57MVnxxjLoQpQYuP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19063/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19063/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:04.696 [print] {
"resourceType": "Observation",
"id": "19063",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:07.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
> *
print COOKIES
10:05:04.696 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:04.699 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"526"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:04.699 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"57MVnxxjLoQpQYuP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19063/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19063/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:04.699 [print] {
"resourceType": "Observation",
"id": "19063",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:07.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
> *
print COOKIES
10:05:04.699 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:05.574 [print] {
"resourceType": "Observation",
"id": "19063",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:07.757+02:00",
"source": "#57MVnxxjLoQpQYuP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "35",
"display": "V. Retinoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:06.189 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:07.014 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:09.267+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:09.267+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:07.016 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:07.629 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:07.629 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YJwTd1Dx8ZAbYRMV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19064/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19064/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:07.629 [print] {
"resourceType": "Observation",
"id": "19064",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:10.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
> *
print COOKIES
10:05:07.629 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:07.631 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"542"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:07.631 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YJwTd1Dx8ZAbYRMV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19064/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19064/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:07.631 [print] {
"resourceType": "Observation",
"id": "19064",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:10.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
> *
print COOKIES
10:05:07.631 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:08.243 [print] {
"resourceType": "Observation",
"id": "19064",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:10.700+02:00",
"source": "#YJwTd1Dx8ZAbYRMV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-08-21",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "57",
"display": "(b.3) Other fibromatous neoplasms"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:08.856 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:09.484 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:11.939+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:11.939+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:09.485 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:10.118 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:10.118 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mpV1dpYRIf7UKE2S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19065/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19065/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:10.118 [print] {
"resourceType": "Observation",
"id": "19065",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:13.192+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
> *
print COOKIES
10:05:10.118 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:10.120 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"548"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:10.120 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mpV1dpYRIf7UKE2S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19065/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19065/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:10.120 [print] {
"resourceType": "Observation",
"id": "19065",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:13.192+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
> *
print COOKIES
10:05:10.120 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:10.763 [print] {
"resourceType": "Observation",
"id": "19065",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:13.192+02:00",
"source": "#mpV1dpYRIf7UKE2S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "23",
"display": "(c.4) Atypical teratoid/rhabdoid tumor"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:11.363 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:11.975 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:14.440+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:14.440+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:11.977 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:12.682 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:12.682 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f4fk52ER31A0eoC2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19066/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19066/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:12.682 [print] {
"resourceType": "Observation",
"id": "19066",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:15.764+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
> *
print COOKIES
10:05:12.682 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:12.684 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"546"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:12.684 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f4fk52ER31A0eoC2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19066/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19066/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:12.684 [print] {
"resourceType": "Observation",
"id": "19066",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:15.764+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
> *
print COOKIES
10:05:12.684 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:13.310 [print] {
"resourceType": "Observation",
"id": "19066",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:15.764+02:00",
"source": "#f4fk52ER31A0eoC2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-04-03",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "53",
"display": "(e) Unspecified malignant bone tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:13.941 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:14.549 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:17.014+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:17.014+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:14.550 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:15.164 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:15.164 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RVQkTBKoZLaHjl3X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19067/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19067/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:15.164 [print] {
"resourceType": "Observation",
"id": "19067",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:18.244+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
> *
print COOKIES
10:05:15.164 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:15.165 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:15.165 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RVQkTBKoZLaHjl3X"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19067/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19067/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:15.165 [print] {
"resourceType": "Observation",
"id": "19067",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:18.244+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
> *
print COOKIES
10:05:15.165 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:15.761 [print] {
"resourceType": "Observation",
"id": "19067",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:18.244+02:00",
"source": "#RVQkTBKoZLaHjl3X",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-07-18",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "20",
"display": "(c.1) Medulloblastomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:16.369 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:17.308 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:19.449+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:19.449+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:17.310 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:17.939 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:17.939 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dC4nbB0POCCQSiCR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19068/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19068/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:17.939 [print] {
"resourceType": "Observation",
"id": "19068",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:21.014+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
10:05:17.939 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:17.940 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"574"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:17.941 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dC4nbB0POCCQSiCR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19068/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19068/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:17.941 [print] {
"resourceType": "Observation",
"id": "19068",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:21.014+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
> *
print COOKIES
10:05:17.941 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:18.655 [print] {
"resourceType": "Observation",
"id": "19068",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:21.014+02:00",
"source": "#dC4nbB0POCCQSiCR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "7",
"display": "(d) Myelodysplastic syndrome and other myeloproliferative diseases"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:19.287 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:19.905 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:22.366+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:22.366+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:19.906 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "95",
"display": "(d) Malignant melanomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:20.556 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:20.556 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2U1xrYoba3mI0lWR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19069/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19069/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:20.556 [print] {
"resourceType": "Observation",
"id": "19069",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:23.631+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "95",
"display": "(d) Malignant melanomas"
}
]
}
}
> *
print COOKIES
10:05:20.556 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:20.558 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"532"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:20.559 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2U1xrYoba3mI0lWR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19069/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19069/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:20.559 [print] {
"resourceType": "Observation",
"id": "19069",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:23.631+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "95",
"display": "(d) Malignant melanomas"
}
]
}
}
> *
print COOKIES
10:05:20.559 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:21.193 [print] {
"resourceType": "Observation",
"id": "19069",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:23.631+02:00",
"source": "#2U1xrYoba3mI0lWR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-11-19",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "95",
"display": "(d) Malignant melanomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:21.869 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:22.539 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:24.936+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:24.936+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:22.541 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:23.159 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:23.159 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"awQtvpnAhP3lTH9B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19070/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19070/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:23.159 [print] {
"resourceType": "Observation",
"id": "19070",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:26.238+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
> *
print COOKIES
10:05:23.159 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:23.160 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"535"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:23.160 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"awQtvpnAhP3lTH9B"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19070/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19070/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:23.160 [print] {
"resourceType": "Observation",
"id": "19070",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:26.238+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
> *
print COOKIES
10:05:23.160 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:23.787 [print] {
"resourceType": "Observation",
"id": "19070",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:26.238+02:00",
"source": "#awQtvpnAhP3lTH9B",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-10-17",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "5",
"display": "(b) Acute myeloid leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:24.439 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:25.338 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:27.519+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:27.519+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:25.339 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "90",
"display": "(d) Gonadal carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:25.928 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:25.928 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"poQq8wpT09aWyAnX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19071/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19071/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:25.928 [print] {
"resourceType": "Observation",
"id": "19071",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:29.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "90",
"display": "(d) Gonadal carcinomas"
}
]
}
}
> *
print COOKIES
10:05:25.928 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:25.930 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:25.930 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"poQq8wpT09aWyAnX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19071/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19071/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:25.930 [print] {
"resourceType": "Observation",
"id": "19071",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:29.010+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "90",
"display": "(d) Gonadal carcinomas"
}
]
}
}
> *
print COOKIES
10:05:25.930 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:26.561 [print] {
"resourceType": "Observation",
"id": "19071",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:29.010+02:00",
"source": "#poQq8wpT09aWyAnX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-01",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "90",
"display": "(d) Gonadal carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:27.178 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:27.803 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:30.253+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:30.253+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:27.804 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "71",
"display": "(a.1) Intracranial and intraspinal germinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:28.433 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:28.433 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qf0gbkU0ByzE36m3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19072/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19072/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:28.433 [print] {
"resourceType": "Observation",
"id": "19072",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:31.511+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "71",
"display": "(a.1) Intracranial and intraspinal germinomas"
}
]
}
}
> *
print COOKIES
10:05:28.433 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:28.435 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"554"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:28.435 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qf0gbkU0ByzE36m3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19072/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19072/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:28.435 [print] {
"resourceType": "Observation",
"id": "19072",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:31.511+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "71",
"display": "(a.1) Intracranial and intraspinal germinomas"
}
]
}
}
> *
print COOKIES
10:05:28.435 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:29.021 [print] {
"resourceType": "Observation",
"id": "19072",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:31.511+02:00",
"source": "#Qf0gbkU0ByzE36m3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-07-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "71",
"display": "(a.1) Intracranial and intraspinal germinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:29.737 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:30.381 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:32.804+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:32.804+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:30.382 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "89",
"display": "(c.7) Malignant gonadal gonadoblastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:31.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:31.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2hBW78jFbxbjwmMR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19073/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19073/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:31.070 [print] {
"resourceType": "Observation",
"id": "19073",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:34.151+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "89",
"display": "(c.7) Malignant gonadal gonadoblastoma"
}
]
}
}
> *
print COOKIES
10:05:31.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:31.071 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:31.071 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2hBW78jFbxbjwmMR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19073/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19073/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:31.072 [print] {
"resourceType": "Observation",
"id": "19073",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:34.151+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "89",
"display": "(c.7) Malignant gonadal gonadoblastoma"
}
]
}
}
> *
print COOKIES
10:05:31.072 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:31.695 [print] {
"resourceType": "Observation",
"id": "19073",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:34.151+02:00",
"source": "#2hBW78jFbxbjwmMR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-04-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "89",
"display": "(c.7) Malignant gonadal gonadoblastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:32.368 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 16ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 16ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:33.216 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:35.436+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:35.436+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:33.218 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "93",
"display": "(b) Thyroid carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:33.894 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:33.894 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hFJKZd4T5vedEmc0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19074/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19074/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:33.895 [print] {
"resourceType": "Observation",
"id": "19074",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:36.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "93",
"display": "(b) Thyroid carcinomas"
}
]
}
}
> *
print COOKIES
10:05:33.895 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:33.896 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"531"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:33.896 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hFJKZd4T5vedEmc0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19074/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19074/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:33.896 [print] {
"resourceType": "Observation",
"id": "19074",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:36.970+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "93",
"display": "(b) Thyroid carcinomas"
}
]
}
}
> *
print COOKIES
10:05:33.896 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:34.531 [print] {
"resourceType": "Observation",
"id": "19074",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:36.970+02:00",
"source": "#hFJKZd4T5vedEmc0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-10-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "93",
"display": "(b) Thyroid carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:35.163 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:35.780 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:38.239+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:38.239+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:35.782 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "73",
"display": "(a.3) Intracranial and intraspinal embryonal carcinomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:36.383 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:36.383 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KAkJ2SisgAfI8wbh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19075/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19075/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:36.383 [print] {
"resourceType": "Observation",
"id": "19075",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:39.462+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "73",
"display": "(a.3) Intracranial and intraspinal embryonal carcinomas"
}
]
}
}
> *
print COOKIES
10:05:36.383 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:36.384 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:36.384 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KAkJ2SisgAfI8wbh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19075/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19075/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:36.384 [print] {
"resourceType": "Observation",
"id": "19075",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:39.462+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "73",
"display": "(a.3) Intracranial and intraspinal embryonal carcinomas"
}
]
}
}
> *
print COOKIES
10:05:36.384 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:37.431 [print] {
"resourceType": "Observation",
"id": "19075",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:39.462+02:00",
"source": "#KAkJ2SisgAfI8wbh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2014-11-04",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "73",
"display": "(a.3) Intracranial and intraspinal embryonal carcinomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:38.144 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:38.757 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:41.227+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:41.227+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:38.758 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-03-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:40.380 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:40.380 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R1IkQeiMehM7WpOs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19076/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19076/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:40.380 [print] {
"resourceType": "Observation",
"id": "19076",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:43.458+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-03-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
> *
print COOKIES
10:05:40.380 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:40.382 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"538"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:40.382 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R1IkQeiMehM7WpOs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19076/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19076/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:40.382 [print] {
"resourceType": "Observation",
"id": "19076",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:43.458+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-03-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
> *
print COOKIES
10:05:40.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:42.030 [print] {
"resourceType": "Observation",
"id": "19076",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:43.458+02:00",
"source": "#R1IkQeiMehM7WpOs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-03-27",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "1",
"display": "(a.1) Precursor cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:42.738 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:43.359 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:45.816+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:45.816+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:43.361 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:44.207 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:44.207 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8sWiiWZQlDclpyHa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19077/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19077/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:44.207 [print] {
"resourceType": "Observation",
"id": "19077",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:47.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
> *
print COOKIES
10:05:44.207 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:44.209 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:44.209 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8sWiiWZQlDclpyHa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19077/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19077/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:44.209 [print] {
"resourceType": "Observation",
"id": "19077",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:47.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
> *
print COOKIES
10:05:44.209 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:44.838 [print] {
"resourceType": "Observation",
"id": "19077",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:47.269+02:00",
"source": "#8sWiiWZQlDclpyHa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-09-12",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "38",
"display": "(a.3) Kidney sarcomas"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:45.935 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:46.572 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:49.007+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:49.007+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:46.574 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:47.201 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:47.201 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XxUPHm5F4DyC9nhv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19078/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19078/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:47.202 [print] {
"resourceType": "Observation",
"id": "19078",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:50.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
> *
print COOKIES
10:05:47.202 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:47.204 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"537"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:47.204 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XxUPHm5F4DyC9nhv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19078/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19078/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:47.204 [print] {
"resourceType": "Observation",
"id": "19078",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:50.272+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
> *
print COOKIES
10:05:47.204 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:47.837 [print] {
"resourceType": "Observation",
"id": "19078",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:50.272+02:00",
"source": "#XxUPHm5F4DyC9nhv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-08-13",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "2",
"display": "(a.2) Mature B-cell leukemias"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:48.646 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:49.257 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:51.729+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:51.729+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:49.259 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:50.067 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:50.068 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0dutZtwK3KrEdHX5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19079/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19079/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:50.068 [print] {
"resourceType": "Observation",
"id": "19079",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:53.146+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
> *
print COOKIES
10:05:50.068 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:50.070 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:50.070 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0dutZtwK3KrEdHX5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19079/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19079/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:50.070 [print] {
"resourceType": "Observation",
"id": "19079",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:53.146+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
> *
print COOKIES
10:05:50.070 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:50.695 [print] {
"resourceType": "Observation",
"id": "19079",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:53.146+02:00",
"source": "#0dutZtwK3KrEdHX5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2012-11-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "28",
"display": "(e.2) Tumors of the sellar region (craniopharyngiomas)"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:51.289 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:51.914 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:54.372+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:54.372+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:51.915 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "75",
"display": "(a.5) Intracranial and intraspinal choriocarcinoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:52.519 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"559"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:52.519 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LUZw4ATmADiBCyiw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19080/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19080/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:52.519 [print] {
"resourceType": "Observation",
"id": "19080",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:55.599+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "75",
"display": "(a.5) Intracranial and intraspinal choriocarcinoma"
}
]
}
}
> *
print COOKIES
10:05:52.519 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:52.521 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"559"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:52.521 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LUZw4ATmADiBCyiw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19080/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19080/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:52.521 [print] {
"resourceType": "Observation",
"id": "19080",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:55.599+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "75",
"display": "(a.5) Intracranial and intraspinal choriocarcinoma"
}
]
}
}
> *
print COOKIES
10:05:52.521 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:53.137 [print] {
"resourceType": "Observation",
"id": "19080",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:55.599+02:00",
"source": "#LUZw4ATmADiBCyiw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-04-08",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "75",
"display": "(a.5) Intracranial and intraspinal choriocarcinoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:53.759 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:54.782 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:56.844+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:56.844+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:54.784 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "110",
"display": "(a.3) Pulmonary blastoma and pleuropulmonary blastoma"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:55.400 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:55.400 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y6XG7fVWfdoTA3Yi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19081/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19081/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:55.400 [print] {
"resourceType": "Observation",
"id": "19081",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:58.472+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "110",
"display": "(a.3) Pulmonary blastoma and pleuropulmonary blastoma"
}
]
}
}
> *
print COOKIES
10:05:55.400 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:55.403 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"563"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:55.403 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y6XG7fVWfdoTA3Yi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19081/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:05:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19081/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:05:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:55.403 [print] {
"resourceType": "Observation",
"id": "19081",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:58.472+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "110",
"display": "(a.3) Pulmonary blastoma and pleuropulmonary blastoma"
}
]
}
}
> *
print COOKIES
10:05:55.403 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:56.026 [print] {
"resourceType": "Observation",
"id": "19081",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:05:58.472+02:00",
"source": "#y6XG7fVWfdoTA3Yi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2017-04-14",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "110",
"display": "(a.3) Pulmonary blastoma and pleuropulmonary blastoma"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:05:56.658 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:05:57.260 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:05:59.740+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:05:59.740+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:05:57.261 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:58.864 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:58.864 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MsATvlJk2LySzeiF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19082/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:06:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19082/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:06:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:58.864 [print] {
"resourceType": "Observation",
"id": "19082",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:06:01.942+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
> *
print COOKIES
10:05:58.864 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:05:58.866 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"564"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:05:58.866 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MsATvlJk2LySzeiF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19082/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:06:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19082/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:06:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:05:58.866 [print] {
"resourceType": "Observation",
"id": "19082",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:06:01.942+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
> *
print COOKIES
10:05:58.866 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:05:59.469 [print] {
"resourceType": "Observation",
"id": "19082",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:06:01.942+02:00",
"source": "#MsATvlJk2LySzeiF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2015-05-15",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "11",
"display": "(b.2) Mature B-cell lymphomas (except Burkitt lymphoma)"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:06:00.096 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:06:00.696 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:06:03.180+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:06:03.180+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:06:00.698 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:06:01.289 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"555"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:06:01.289 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gp3Xb1NXpHii8qyZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19083/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:06:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19083/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:06:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:06:01.289 [print] {
"resourceType": "Observation",
"id": "19083",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:06:04.370+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
> *
print COOKIES
10:06:01.290 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:06:01.291 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"555"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:06:01.291 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gp3Xb1NXpHii8qyZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19083/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:06:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19083/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:06:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:06:01.291 [print] {
"resourceType": "Observation",
"id": "19083",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:06:04.370+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
> *
print COOKIES
10:06:01.291 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:06:01.919 [print] {
"resourceType": "Observation",
"id": "19083",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:06:04.370+02:00",
"source": "#gp3Xb1NXpHii8qyZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2013-05-22",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "30",
"display": "(e.4) Neuronal and mixed neuronal-glial tumors"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:06:02.532 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:06:03.140 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:06:05.606+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:06:05.606+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
10:06:03.141 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "107",
"display": "(f.11) Carcinomas of unspecified site"
}
]
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:06:03.773 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:06:03.773 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QQLB02FWLG1D0wUT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19084/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:06:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19084/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:06:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:06:03.773 [print] {
"resourceType": "Observation",
"id": "19084",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:06:06.843+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "107",
"display": "(f.11) Carcinomas of unspecified site"
}
]
}
}
> *
print COOKIES
10:06:03.773 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:06:03.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"547"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:06:03.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QQLB02FWLG1D0wUT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19084/_history/1"
],
"Last-Modified": [
"Fri, 16 Sep 2022 08:06:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/19084/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Fri, 16 Sep 2022 08:06:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:06:03.775 [print] {
"resourceType": "Observation",
"id": "19084",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:06:06.843+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "107",
"display": "(f.11) Carcinomas of unspecified site"
}
]
}
}
> *
print COOKIES
10:06:03.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:06:04.387 [print] {
"resourceType": "Observation",
"id": "19084",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-16T10:06:06.843+02:00",
"source": "#QQLB02FWLG1D0wUT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-diagnosis-eu-pcsp"
]
},
"language": "ES",
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "29308-4",
"display": "Diagnosis"
}
]
},
"effectiveDateTime": "2016-12-23",
"valueCodeableConcept": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/iccc-3",
"code": "107",
"display": "(f.11) Carcinomas of unspecified site"
}
]
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
10:06:05.005 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
10:06:05.597 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-16T10:06:08.086+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-16T10:06:08.086+02:00"
}
]
}